Ruby on Rails Monday, December 2, 2013

As we say in rails skinny controllers, fat models.
Ideally most of the business logic, all database interactions should go to model, becz model is meant to do it.
controller methods should only contain request and response code, so that it is easy to test.

Regards

On Monday, 2 December 2013 11:46:43 UTC+5:30, Ruby-Forum.com User wrote:
Hi all,
 what you used to do when your controller function gets lengthy
sometimes ?
a way i found is just split the function. What is the real and Rails way
to keep my code cleaner and maintainable.
Thanks,
Lekha.

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/d0daedc2-710d-4e0b-b4e2-e9e99678b54b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment