On Oct 7, 12:50 am, elioncho <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Well I have implemented in my app a wall similar to the one found on
> facebooks user profiles. I have created a wall_comments controller and
> wall_comment model. Only friends can post in each others wall. On my
> views I check that if the current user is not friend of a particular
> user the form for posting a comments is not shown. On the
> wall_comments controller I have a before_filter for the create action
> that checks if the two users are friends. And on my wall_comment model
> I have a validate_on_save method that checks again if the two users
> are friends again.
>
> Is this a good practice? That much validations? More queries, slower
> response times? Any suggestions or is it ok like that?
>
> Thanks,
>
> Elioncho

I'd drop the before_filter for the create action, since you're already
doing validations on the model side.
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to