aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/mass_assignment_security.rb
Commit message (Collapse)AuthorAgeFilesLines
* Remove MassAssignmentSecurity from ActiveModelGuillermo Iguaran2012-09-161-350/+0
| | | | This will be moved out to protected_attributes gem
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-08-041-66/+178
|\ | | | | | | | | | | Conflicts: activemodel/lib/active_model/secure_password.rb activerecord/lib/active_record/associations/collection_proxy.rb
| * fix class reference in AM::MassAssignmentSecurity documentation [ci skip]Francesco Rodriguez2012-07-291-3/+3
| |
| * update ActiveModel::MassAssignmentSecurity docs [ci skip]Francesco Rodriguez2012-07-281-65/+177
| |
* | load active_support/core_ext/class/attribute in active_support/railsXavier Noria2012-08-021-1/+0
|/
* Changed attr_accessible example to reflect grouped rolesLaknath2012-07-011-2/+4
| | | | | Related to the request #5699 - https://github.com/rails/rails/pull/5699 and not documented.
* Simplify AR configuration code.Jon Leighton2012-06-151-6/+4
| | | | | Get rid of ActiveModel::Configuration, make better use of ActiveSupport::Concern + class_attribute, etc.
* Add comment for attr_accessible/attr_protected :as option. [ci skip]Edward Tsech2012-05-251-2/+2
|
* Improve logging of ActiveModel::MassAssignmentSecurity::SanitizerNaoto Takai2012-05-171-1/+1
|
* Improve docs for attr_accessible|protected related to Hash#except|sliceCarlos Antonio da Silva2012-03-061-8/+10
|
* Fix sanitize_for_mass_assigment when role is nilFabio Yamate2012-02-151-3/+3
| | | | | | | There is an example in Rails documentation that suggests implementing assign_attributes method for ActiveModel interface, that by default sends option role with nil. Since mass_assignment_authorizer never is called without args, we can move the default value internally.
* Array.wrap no longer neededAaron Patterson2012-01-041-3/+2
|
* Support configuration on ActiveRecord::Model.Jon Leighton2011-12-281-10/+12
| | | | | | | | | | | | | | | The problem: We need to be able to specify configuration in a way that can be inherited to models that include ActiveRecord::Model. So it is no longer sufficient to put 'top level' config on ActiveRecord::Base, but we do want configuration specified on ActiveRecord::Base and descendants to continue to work. So we need something like class_attribute that can be defined on a module but that is inherited when ActiveRecord::Model is included. The solution: added ActiveModel::Configuration module which provides a config_attribute macro. It's a bit specific hence I am not putting this in Active Support or making it a 'public API' at present.
* AM::MAS.attr_protected: rework usage example.Bogdan Gusiev2011-12-231-9/+9
|
* Fixed AM::MasAsSec.attr_protected usage example. Bogdan Gusiev2011-12-221-15/+16
| | | | | | | | Problems with current example: * DOESN'T WORK ** attr_protected :last_login, :as => :admin # doesn't make it accessible for admin * Uses ActiveSupport Fixnum extension
* Fix AM::MassAssignementSecurity docBogdan Gusiev2011-12-221-1/+1
|
* Minor formating fixAlexander Uvarov2011-06-241-2/+2
|
* Follow rails convention by using Array.wrapAlexander Uvarov2011-06-231-2/+3
|
* Allow to specify mass-assignment roles as arrayAlexander Uvarov2011-06-231-2/+8
|
* no need for .rbDamien Mathieu2011-05-311-1/+1
|
* string inflections are needed for running tests in isolationDamien Mathieu2011-05-311-0/+1
|
* Transform the symbol into a constant lookup.José Valim2011-05-311-17/+13
|
* ActiveModel::MassAssignmentSecurity.mass_assignment_sanitizer methodBogdan Gusiev2011-05-301-6/+24
| | | | | In order to specify your own sanitize method Implemented .mass_assignment_sanitizer configuration option
* MassAssignmentSecurity: add ability to specify your own sanitizerBogdan Gusiev2011-05-261-5/+9
| | | | | | Added an ability to specify your own behavior on mass assingment protection, controlled by option: ActiveModel::MassAssignmentSecurity.mass_assignment_sanitizer
* renamed mass-assignment scopes to roles, updated code, tests, docs and ↵Josh Kalderimis2011-05-081-23/+23
| | | | security guide
* minor correction to the AMo mass-assignment security docsJosh Kalderimis2011-04-241-1/+1
|
* AM mass assignment security attr_accessible and attr_protected now allow for ↵Josh Kalderimis2011-04-241-34/+85
| | | | | | | | scopes using :as => scope eg. attr_accessible :name attr_accessible :name, :admin, :as => :admin
* Remove Example headers. Code just flows with the text. 6ce844a3Paco Guzman2011-03-061-3/+1
|
* Properly indent code example blockDaniel Schierbeck2011-01-151-19/+19
|
* Change documentation for ActiveModel::MassAssignmentSecurity a bit and make ↵José Valim2010-07-081-26/+41
| | | | debug always be called since some people may overwrite warn! to add extra behavior even if logger is not available.
* mass_assignment_security moved from AR to AMo, and minor test cleanupJosh Kalderimis2010-07-081-0/+145
Signed-off-by: José Valim <jose.valim@gmail.com>