@@ -1,9 +1,9 @@ |
||
| 1 | 1 |
module ApplicationHelper |
| 2 | 2 |
def nav_link(name, path, options = {}, &block)
|
| 3 |
- if glyphicon = options[:glyphicon] |
|
| 3 |
+ if glyphicon = options.delete(:glyphicon) |
|
| 4 | 4 |
name = "<span class='glyphicon glyphicon-#{glyphicon}'></span> ".html_safe + name
|
| 5 | 5 |
end |
| 6 |
- content = link_to(name, path) |
|
| 6 |
+ content = link_to(name, path, options) |
|
| 7 | 7 |
active = current_page?(path) |
| 8 | 8 |
if block |
| 9 | 9 |
# Passing a block signifies that the link is a header of a hover |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 |
<%= nav_link "Agents", agents_path do %> |
| 16 | 16 |
<ul class='dropdown-menu' role='menu'> |
| 17 | 17 |
<%= nav_link "New Agent", new_agent_path, glyphicon: "plus" %> |
| 18 |
- <%= nav_link "Run event propagation", propagate_agents_path, glyphicon: "refresh" %> |
|
| 18 |
+ <%= nav_link "Run event propagation", propagate_agents_path, method: 'post', glyphicon: "refresh" %> |
|
| 19 | 19 |
<%= nav_link "View Diagram", diagram_path, glyphicon: 'random' %> |
| 20 | 20 |
</ul> |
| 21 | 21 |
<% end %> |