#RubyOnRails - 20 September 2018
« Back 1 day
[07:10:52] ss942: I have application, and it's plugin. I want to serve data from plugin in application view (via controller ofc) How do I do it?
[07:42:28] mpodien: Not using ROR but I thought since you popularized MVC you can answer me this: May a controller depend on multiple models or is it always 1 controller 1 model?
[07:47:43] sevenseacat: rails follows a convention called resourceful routing, which tries to define a set of actions per controller
[07:48:44] mpodien: is there a name for what then manages interactions between.. i guess.. models? for when an action for model x ought be followed by an action for model y?
[07:55:25] mpodien: forgive my ignorance: lets say i have a web store. when i load the front page i will need a selection of products and i will need my user data. so i'll have to request data from two models. no? and it's a single request?
[07:57:42] mpodien: so then don't you in practice constantly provide web access points to multiple models?
[08:00:27] sevenseacat: when you access that URL you're probably going to want a lot of data, like the current user to show in the top navigation, details of the current cart, product details, maybe stock details