Skip to content
lankz edited this page Feb 11, 2013 · 1 revision

SuperResources is designed with support for the strong_parameters gem in mind. First, make sure you have something along the lines of the following in Gemfile:

gem 'strong_parameters'
gem 'super_resources'

Then you need to override the resource_params method in your controllers, and return a Strong Parameters hash in the usual way:

class PostsController < ApplicationController
  include SuperResources::Controller

  protected

  def resource_params
    params.require(:post).permit(:title, :body)
  end
end
Clone this wiki locally