4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Rails 4.0.0.rc1でActiveAdmin使う場合

Last updated at Posted at 2013-05-08

2013/5/8 時点ではまだPullRequestがマージされていないので、akashkambojさんのrails4ブランチ使う

Gemfile
gem 'ransack', github: 'avit/ransack', branch: 'rails4-dependencies'
gem 'activeadmin', github: 'akashkamboj/active_admin', branch: 'rails4'

Strong Parameters許可しておく

config/initializers/active_admin.rb
ActiveAdmin::ResourceController.class_eval do
  # ActiveAdminからのリクエストパラメータはStrong Parameters許可する
  def resource_params
    [(params[resource_request_name] || params[resource_instance_name]).try(:permit!) || {}]
  end
end
4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?