Displaying 1 result from an estimated 1 matches for "catalogs_controller".
2008 Jan 30
1
Can before_filter using Proc and specify block ?
...t can specify the Proc in the before_filter function, but when
specify when action apply this filter, it raise an syntax error, such
as rthe following code
before_filter {|controller| c.send(:catalog_access,
[current_user])}, :only=>[:manage_catalog]
Will raise an syntax error
app/controllers/catalogs_controller.rb:7: syntax error, unexpected
'','', expecting kEND
before_filter {|controller| c.send(:catalog_access,
[current_user])}, :only=>[:manage_catalog]
Is before_filter using Proc can specify which action to filtering
with ?
Thank,
Patrick
--~--~---------~--~----~------------~...