Rails 4: before_filter vs. before_action

后端 未结 5 834
没有蜡笔的小新
没有蜡笔的小新 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:28

    before_filter/before_action: means anything to be executed before any action executes.

    Both are same. they are just alias for each other as their behavior is same.

提交回复
热议问题