On Apr 12, 2011, at 5:57 PM, kevinpfromnm wrote:

> the available_to parameter isn't the easiest to understand at first look... 
> here's pieces of a similar functionality lifecycle that I made:
> 
>     named_scope :administrators, :conditions => { :administrator => true }
> 
>     transition :ban, { [:verified, :unverified, :active, :inactive] => 
> :banned }, 
>         :available_to => User.administrators 

FYI, you probably want quotes and/or braces around User.administrators there; 
otherwise, it's going to hit the DB once at class load and then never again. 
Not a big deal in dev mode, but will cause odd behavior in production.

--Matt Jones


-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to