Revision 4b2873a6
Added by June Zhang over 7 years ago
app/helpers/application_helper.rb | ||
---|---|---|
text = options.delete(:text) || _("Delete")
|
||
method = options.delete(:method) || :delete
|
||
options = {:auth_action => :destroy}.merge(options)
|
||
html_options = { :data => { :confirm => _('Are you sure?') }, :method => method, :class => 'delete' }.merge(html_options)
|
||
html_options = { :data => { :confirm => _('Are you sure?') }, :method => method }.merge(html_options)
|
||
display_link_if_authorized(text, options, html_options)
|
||
end
|
||
|
Also available in: Unified diff
Fixes #18763 - Change delete button to standard style