Rails 4: before_filter vs. before_action

后端 未结 5 821
没有蜡笔的小新
没有蜡笔的小新 2020-11-27 09:39

In rails >4.0.0 generators creates CRUD operations with before_action not before_filter. It seems to do the same thing. So what\'s the difference b

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-27 10:29

    It is just a name change. before_action is more specific, because it gets executed before an action.

提交回复
热议问题