app/controllers/smithy/base_controller.rb in smithycms-0.0.3 vs app/controllers/smithy/base_controller.rb in smithycms-0.4.0
- old
+ new
@@ -9,6 +9,15 @@
unless smithy_current_user && smithy_current_user.smithy_admin?
flash.alert = "Please login to continue."
redirect_to smithy_login_path
end
end
+
+ def filtered_params
+ permitted_params.params_for controller_name.singularize
+ end
+
+ def permitted_params
+ permitted_params ||= PermittedParams.new(params, smithy_current_user)
+ end
+ helper_method :permitted_params
end