ruby on rails tough questions

 

22. Explain about 'fat model, skinny controller' in ruby on rails?

Ans. 'Fat Model, Skinny Controller' alludes to how the M and C parts of MVC in a perfect world work together. In particular, any non-reaction related rationale ought to go in the Model, preferably in a pleasant, testable technique. In the interim, the "inside scoop" controller is essentially a pleasant interface between the view and Model. 

By and by, this can require a scope of various sorts of refactoring. Yet, everything boils down to one thought: by moving any rationale that isn't about the reaction to the Model (rather than the controller), have you advanced reuse where conceivable as well as made it conceivable to test your code outside of the setting of a solicitation.

Comments

Popular posts from this blog

Rails 7 Features :: Comparison with Rails 6 and Rails 5