Ruby on Rails Wednesday, September 8, 2010

I understand that controller's are basically the link between views and models. However, I'm a little confused as to how a controller should be structured beyond CRUD functionality.

Here's a use case:

During the creation of a new object the user will be asked to input a parameter. The parameter will be used to perform a search to help ensure the object doesn't already exist in the system before continuing.

I'm not sure where that search procedure should be located. I could put it in middleware controller but I'm not sure if that's the most appropriate place.

Do any of you more seasoned Rails developers have any insight?

--
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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment