app/controllers/admin/roles_controller.rb in the_role-1.3.1 vs app/controllers/admin/roles_controller.rb in the_role-1.4.0

- old
+ new

@@ -2,11 +2,13 @@ class Admin::RolesController < ApplicationController layout 'the_role' before_filter :the_login_required before_filter :the_role_require - before_filter :find_role, :only => [:show, :edit, :update, :destroy, :new_role_section, :new_role_policy] + + before_filter :the_role_find, :only => [:show, :edit, :update, :destroy, :new_role_section, :new_role_policy] + before_filter :the_role_object, :only => [:show, :edit, :update, :destroy, :new_role_section, :new_role_policy] before_filter :the_owner_require, :only => [:show, :edit, :update, :destroy, :new_role_section, :new_role_policy] def index @roles = Role.all(:order => "created_at ASC") end @@ -98,10 +100,10 @@ redirect_to admin_roles_url end protected - def find_role + def the_role_find @role = Role.find(params[:id]) end end