No description, website, or topics provided.
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
spec
.gitattributes
.gitignore
Gemfile
Rakefile
Readme.rdoc
mass_assignable.gemspec

Readme.rdoc

Mass Assignable gem

WARNING : This gem has been much more difficult to build that I initialy thought. It doesn't work, don't use it

This gem serves a very simple purpose : allowing some roles to bypass the mass assignment security

Mass assignment protection is very important and this gem is not about disabling it (there is a config option in rails for that).

This gem is about giving superpowers to some roles like 'system' or 'admin'. A 'system' role could be used to deserialize some objects from a redis database, an 'admin' role could be used for doing some management of records from a protected section of the app, …

Usage Example with activeadmin

#config/initializers/mass_assignable.rb
MassAssignable::Config.configure do |c|
  c.mass_assigners = %w(admin)
end

module ActiveAdmin
  class BaseController
    with_role :admin
  end
end

I intend to use this gem on my own project and do the maintenance as far as I need it. This means that I'm very likely to work on bugs but less likely to work on features demands.

This code is released under the Beer-ware License