It''s a design decision, but I think yes if only so that you easily get
seperate views/view helpers as I''m sure a Post and a Comment will look
different.
If you have lots of similar bits it each then you can put them in a
module/mixin in the lib directory.
On Mar 25, 12:50 pm, atmorell
<atmor...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hello,
>
> I am building a small test application for learning RoR. I understand
> most of what is going on and all my relations is set up correctly.
> (tested with console) I can''t figure out when to spilt out models
into
> separate controllers. Is it overkill to create a controller for each
> model? Let me give an example.
>
> Users -> Pos -> Comments
>
> The show post page will display the Post and it''s comments. At the
> moment I got a Post controller with CRUD (R both post and comments)
> and a Comments controller with CUD. Would it make sense to merge these
> two controllers into one controller?
>
> Best regards.
> Asbjørn Morell.
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
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
-~----------~----~----~----~------~----~------~--~---