@@ -19,8 +19,8 @@ def authorized?(action, abstract_model = nil, object = nil)
19
19
20
20
def current_action? ( action , abstract_model = @abstract_model , object = @object )
21
21
@action . custom_key == action . custom_key &&
22
- abstract_model . try ( :to_param ) == @abstract_model . try ( :to_param ) &&
23
- ( @object . try ( :persisted? ) ? @object . id == object . try ( :id ) : !object . try ( :persisted? ) )
22
+ abstract_model . try ( :to_param ) == @abstract_model . try ( :to_param ) &&
23
+ ( @object . try ( :persisted? ) ? @object . id == object . try ( :id ) : !object . try ( :persisted? ) )
24
24
end
25
25
26
26
def action ( key , abstract_model = nil , object = nil )
@@ -116,7 +116,7 @@ def breadcrumb(action = @action, _acc = [])
116
116
o = a . send ( :eval , 'bindings[:object]' )
117
117
content_tag ( :li , class : current_action? ( a , am , o ) && 'active' ) do
118
118
crumb = begin
119
- if not current_action? ( a , am , o )
119
+ if ! current_action? ( a , am , o )
120
120
if a . http_methods . include? ( :get )
121
121
link_to url_for ( action : a . action_name , controller : 'rails_admin/main' , model_name : am . try ( :to_param ) , id : ( o . try ( :persisted? ) && o . try ( :id ) || nil ) ) , class : 'pjax' do
122
122
wording_for ( :breadcrumb , a , am , o )
@@ -155,13 +155,13 @@ def bulk_menu(abstract_model = @abstract_model)
155
155
return '' if actions . empty?
156
156
content_tag :li , class : 'dropdown' , style : 'float:right' do
157
157
content_tag ( :a , class : 'dropdown-toggle' , :'data-toggle' => 'dropdown' , href : '#' ) { t ( 'admin.misc.bulk_menu_title' ) . html_safe + '<b class="caret"></b>' . html_safe } +
158
- content_tag ( :ul , class : 'dropdown-menu' , style : 'left:auto; right:0;' ) do
159
- actions . collect do |action |
160
- content_tag :li do
161
- link_to wording_for ( :bulk_link , action ) , '#' , onclick : "jQuery('#bulk_action').val('#{ action . action_name } '); jQuery('#bulk_form').submit(); return false;"
162
- end
163
- end . join . html_safe
164
- end
158
+ content_tag ( :ul , class : 'dropdown-menu' , style : 'left:auto; right:0;' ) do
159
+ actions . collect do |action |
160
+ content_tag :li do
161
+ link_to wording_for ( :bulk_link , action ) , '#' , onclick : "jQuery('#bulk_action').val('#{ action . action_name } '); jQuery('#bulk_form').submit(); return false;"
162
+ end
163
+ end . join . html_safe
164
+ end
165
165
end . html_safe
166
166
end
167
167
end
0 commit comments