@@ -30,7 +30,7 @@ def show_action_link(path = nil)
3030 # Uses the current +entry+ if no path is given.
3131 def edit_action_link ( path = nil )
3232 path ||= path_args ( entry )
33- path = path . is_a? ( String ) ? path : edit_polymorphic_path ( path )
33+ path = edit_polymorphic_path ( path ) unless path . is_a? ( String )
3434 action_link ( ti ( 'link.edit' ) , 'pencil' , path )
3535 end
3636
@@ -47,15 +47,15 @@ def destroy_action_link(path = nil)
4747 # Uses the current +model_class+ if no path is given.
4848 def index_action_link ( path = nil , url_options = { returning : true } )
4949 path ||= path_args ( model_class )
50- path = path . is_a? ( String ) ? path : polymorphic_path ( path , url_options )
50+ path = polymorphic_path ( path , url_options ) unless path . is_a? ( String )
5151 action_link ( ti ( 'link.list' ) , 'list' , path )
5252 end
5353
5454 # Standard add action to given path.
5555 # Uses the current +model_class+ if no path is given.
5656 def add_action_link ( path = nil , url_options = { } )
5757 path ||= path_args ( model_class )
58- path = path . is_a? ( String ) ? path : new_polymorphic_path ( path , url_options )
58+ path = new_polymorphic_path ( path , url_options ) unless path . is_a? ( String )
5959 action_link ( ti ( 'link.add' ) , 'plus' , path )
6060 end
6161
0 commit comments