This post originated from an RSS feed registered with Ruby Buzz
by rodney ramdas.
Original Post: Rails Core Weekly July 2 - July 16
Feed Title: pinupgeek.com
Feed URL: http://feeds.feedburner.com/pinupgeek
Feed Description: A personal take on Ruby and Rails
Martin is working on patch that in his opinion 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.
Peter Michaux would like a label helper that does :
<%= f.label :name %>
Turns out Rick Olson wrote a plugin that does: http://svn.techno-weenie.net/projects/plugins/labeled_form_helper/ There’s a discussion about this plugin and the general question is ‘why isn’t this in core ?’.
fails miserably with revision r4498. Jamis is spot on when he advises to take out the \A and \Z from the regexp. Nicholas adds => /[a-z]/ routes should interpret this as \A[a-z]\Z. There for ^, \A, \Z, and $ inside regexp captures for requirements is not required, and should not be allowed”. Francois then suggests he writes a patch to help those who will encounter this on their paths. Nicholas point him in the right direction.
Caio Chassot ran into an issue where flash was not swept if the filter chain was halted. Caio supplies a full test scenarion, go read it. Ricks promises he’ll give it some attention over the weekend to fix it.