Skip to content

Systho/mass_assignable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages