Displaying 1 result from an estimated 1 matches for "project_scop".
Did you mean:
project_scope
2006 Jul 16
1
Rails Core Weekly July 2 - July 16
...improves on
ActionController filters. His solution could work like this:
add_filter :filter => ProjectScope.new, :except => [:list,:index]
class ProjectScope
def filter(controller)
Project.with_scope( ..etc.. )
yield
end
end
end
add_filter :filter => :project_scope, :except => [:list, :index]
def project_scope
yield
# this way drops the clean filter scope in favor of the simplicity
of using controller methods.
end
This would make before and after filters unnecessary.
[ thread: http://www.ruby-forum.com/topic/71743#new ]
Peter Michaux would...