Wednesday, November 14, 2012

Re: [Rails] Cancan question - create rule issue

On 13 November 2012 23:07, Stan McFarland
<stan.mcfarland@blackoakweb.com> wrote:
> Hi, RoR newbie here. Fairly new, anyway. :). I have a cancan question I'm hoping someone can help me with. I have two models - ProposalRequest and Proposal. Each ProposalRequest can have many Proposals, but a given user can submit only one Proposal for each ProposalRequest. I can't figure out how to define the rule in ability.rb for the create action. Can someone help?

It might be easier to do it with a validation rather than cancan, or
would that not do what you want?

Colin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate