Use before_action instead of before_filter

上级 7f302685
class Dashboard::TodosController < Dashboard::ApplicationController
before_filter :find_todos, only: [:index, :destroy_all]
before_action :find_todos, only: [:index, :destroy_all]
def index
@todos = @todos.page(params[:page]).per(PER_PAGE)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册