allow to preselect order view
This commit is contained in:
parent
1129cf4094
commit
65041c78c5
3 changed files with 12 additions and 17 deletions
|
|
@ -2,7 +2,8 @@
|
|||
module OrdersHelper
|
||||
|
||||
def update_articles_link(order, text, view, options={})
|
||||
options.merge!({remote: true, id: "view_#{view}_btn"})
|
||||
options = {remote: true, id: "view_#{view}_btn", class: ''}.merge(options)
|
||||
options[:class] += ' active' if view.to_s == @view.to_s
|
||||
link_to text, order_path(order, view: view), options
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue