Commit f9ed0cce2330fdc23e75f5bdf913ab5a87c9b147
1 parent
c0cf8ea1
Exists in
master
and in
29 other branches
rails3: fix button with specified format
There is a problem in rails 3.2 when using :format with url_for. It seems that only works with named routes.
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
app/views/users/_index_buttons.html.erb
1 | 1 | <% button_bar do %> |
2 | - <%= button :'text-plain', _('User list as [CSV]'), :action => :download, :format => 'csv' %> | |
3 | - <%= button :'text-html', _('User list as [XML]'), :action => :download, :format => 'xml' %> | |
2 | + <%= button :'text-plain', _('User list as [CSV]'), :action => 'download.csv' %> | |
3 | + <%= button :'text-html', _('User list as [XML]'), :action => 'download.xml' %> | |
4 | 4 | <%= button :send, _('Send e-mail to all users'), :action => 'send_mail' %> |
5 | 5 | <%= button :back, _('Back'), :controller => 'admin_panel' %> |
6 | 6 | <% end %> | ... | ... |