El viernes, 3 de marzo de 2017 18:17:33 (CET) Jason Fleetwood-Boldt escribió:
> Simple question: Can I specify an ignore_method on this action link?
> 
> When I try this:
> config.action_links.member.add :override_weight_limit, label: 'Override
> Weight Limit',  :method => :put, :page => true, :type => :member,
> :ignore_method => :hide_override_link?
> 
> 
> I get a crash ArgumentError - wrong number of arguments (1 for 0)


You get that error because ActiveScaffold is calling hide_override_link? 
method with record parameter, and your method doesn't have arguments. Add 
record parameter to your method and it will work


> 
> full stacktrace:
> 
> https://gist.github.com/mackweldon-admin/7b885aef403a6a2a2683ce8df6c62901
> <https://gist.github.com/mackweldon-admin/7b885aef403a6a2a2683ce8df6c62901>
> 
> 
> Any tips or ideas for how to make this work? I want to hide this action link
> if the user doesn't have a specific privilege. (Which I've configured in my
> app.)
> 
> -Jason
> 
> 
> ----
> 
> Jason Fleetwood-Boldt
> [email protected]
> http://www.jasonfleetwoodboldt.com/writing
> 
> If you'd like to reply by encrypted email you can find my public key on
> jasonfleetwoodboldt.com <http://jasonfleetwoodboldt.com/> (more about
> setting GPG: https://gpgtools.org)


-- 
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails Gem" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/activescaffold.
For more options, visit https://groups.google.com/d/optout.

Reply via email to