Did you try in your Post model belongs_to :user, ... ... def update_permitted? post.user == acting_user end
and in User model has_one :post, I think that should do, but I am no expert... On 16 Lut, 09:24, Bilal Ahmed <[email protected]> wrote: > Is there a way to restrict 1 record per user? > > For e.g. requirement is that one user can add one comment / post and > there could be many responses to that comment. > > There should be only one comment text box and once entered then user > can only edit that comment. -- 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.
