Sha256: 821b18d0bbd7a7df4955ccd49dd5fe220e949bdafb939773103e48355522c557

Contents?: true

Size: 569 Bytes

Versions: 2

Compression:

Stored size: 569 Bytes

Contents

= 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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
attribute-permissions-1.0 README
attribute-permissions-0.9 README