简体   繁体   中英

Basic question about MVC in Ruby on Rails

I'm having a bit of trouble understanding the implementation of MVC in Ruby on Rails. Am I supposed to put the bulk of my code in the models, using the controllers to link them to the views? Do I use redirect_to to move between different controllers when necessary?

You put your logic into the models. If needed, use redirect. But you use that often for POST answers, other use cases are not that common.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM