Reactions to story from self.works_with_ruby? - Home
acts_as_state_machine with auto named_scope powers
http://workswithruby.com/ 2008/ 5/ acts_as_state_machine-with-auto-named_scope-powe...
Rails 2.1 (Soon to be released?) brings us integrated named_scope‘ing. I’ve already mentioned named_scope here and there, and you can find a complete writeup on Ryan Daigle’s Blog While working on projects on Rails Edge, we used to have the same pattern over and over. class Mail < ActiveRecord::Base include AASM aasm_state :created aasm_state :sending aasm_state :sent aasm_state :failed aasm_state :delayed named_scope :created, :conditions => {:status => 'created'} named_scope :sending, :conditions => {:status => 'sending'} named_scope :sent, :conditions => {:status =>
More rising blog posts
-
Entertainment »
Venus Williams Suffers Wardrobe Malfunction (Photos) -
Business »
WIN: Early Adopters Always Pay -
Lifestyle »
Wafergate Starter on Freethought Radio This Weekend -
Politics »
Why Are We Late to Know Obama is Leading McCain? -
Sports »
Rams News and Notes -
Technology »
Touchscreens at Oakland As Stadium
More rising news stories
-
Entertainment »
Marilyn Manson: Overrated, Underrated, Or Just Freakin' Weird? -
Business »
What the FDIC is Doing to Stabilize Troubled Banks -
Lifestyle »
Gore's Bold Plan to Save the Planet -
Politics »
Statement by the Press Secretary on Iraq -
Sports »
Wirtz scores, with assist from McDonough -
Technology »
Virtual Theaters for Documentaries
Recent posts from self.works_with_ruby? - Home
-
array x array?
10 hours ago -
Peepcode Minibook
7 days ago -
WTF?!
31 days ago