Forum: Ruby on Rails comprehension question about controllers

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Heinz S. (Guest)
on 2009-03-05 12:53
Hello,

I have around 7 controllers with each 6-12 actions. Some of these
actions use about 3-5 actions only working with another model and they
don't have much to do with the controller they're in but getting one
single id in order to get the right data out of the other model.

What do you guys think? Is it alright to have them in these controllers
or should I already create a own controller for these 3-5 actions
relating to that one model?

I'm not sure if it's alright or dirty or whatever. Just wanna know your
opinions.

Thanks
Heinz S. (Guest)
on 2009-03-06 13:55
No opinions?
Colin L. (Guest)
on 2009-03-06 14:04
(Received via mailing list)
I would suggest you have a look at
http://www.rubyrailways.com/great-ruby-on-rails-re...

2009/3/6 Heinz S. <removed_email_address@domain.invalid>
Heinz S. (Guest)
on 2009-03-06 14:11
Thanks, I'll have a look.
Heinz S. (Guest)
on 2009-03-06 14:47
Didn't tell me much I didn't know already but what it didn't tell is how
am I supposed to keep my application RESTful if I need to load various
resources in one single action?

I mean it's easy to stay RESTful in small applications like a blog with
a small amount of resource and maybe 2 or 3 nested resources but when it
comes to complex application I don't know how to keep it RESTful. How
would you guys do it?
Pradeep G. (Guest)
on 2009-03-09 07:14
(Received via mailing list)
Can you show some example code related to your original query. It will
help us understanding the query in a better way.
This topic is locked and can not be replied to.