A plugin to manage attribute permissions on ActiveRecord more effectively
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
test
.gitignore
LICENSE
README
Rakefile
attribute-permissions.gemspec
init.rb

README

= Attribute permissions

Adds a class and instance method to ActiveRecord::Base that enables you to mass assign attributes circumventing the attribute protection. It can be used in admin actions that don't want to be limited by attr_protected or attr_accessible when assigning attributes.

== Example

  class User < ActiveRecord::Base
    attr_accessible :full_name
  end
  
  # Initialize a new User
  user = User.mass_assign(params[:user])
  user.save
  
  # Update a user
  user.mass_assign(param[:user])
  user.save

== Install

$ gem install attribute-permissions