Best practices to handle routes for STI subclasses in rails

后端 未结 18 1268
面向向阳花
面向向阳花 2020-11-30 16:25

My Rails views and controllers are littered with redirect_to, link_to, and form_for method calls. Sometimes link_to and <

18条回答
  •  遥遥无期
    2020-11-30 17:09

    I suggest you take a look at : https://stackoverflow.com/a/605172/445908, using this method will enable you to use "form_for".

    ActiveRecord::Base#becomes
    

提交回复
热议问题