Ruby on Rails
Monday, February 17, 2014
So you want to say "The user can manage Realty if the agent has the right agency ID or if the agent is nil"?
-- If so, don't use the hash version of the condition. Go ahead and spell it out.
You could also try agent: {agency_id: [nil, user.agency_id] )
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f40cb5fa-b7c9-467a-856c-38a13e3ce80b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment