Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | checking for nested attributes when attribute names specified to wrap them ↵ | Kelton Manzanares | 2017-10-25 | 1 | -6/+7 |
| | | | | as well | ||||
* | Fixed functionality to include method in params_wrapper.rb | Ryan Perez | 2017-10-25 | 1 | -0/+7 |
| | | | | to properly wrap all attributes, including those which are nested. | ||||
* | Use frozen string literal in actionpack/ | Kir Shatrov | 2017-07-29 | 1 | -0/+2 |
| | |||||
* | Don't wrap parameters if query parameter exists | Eugene Kenny | 2017-06-25 | 1 | -7/+2 |
| | | | | | | | | | | | | We want to avoid overwriting a query parameter with the wrapped parameters hash. Previously this was implemented by merging the wrapped parameters at the root level if the key already existed, which was effectively a no-op. The query parameter was still overwritten in the filtered parameters hash, however. We can fix that discrepancy with a simpler implementation and less unnecessary work by skipping parameter wrapping entirely if the key was sent as a query parameter. | ||||
* | Don't wrap parameters if key already exists | Eugene Kenny | 2017-06-24 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | We shouldn't perform parameter wrapping if it would overwrite one of the parameters sent with the request, as that would interfere with reading the parameter directly from the top level `params` hash. The current implementation has logic for this case, but it doesn't handle `nil`/`false` values, which means these parameters: { "user" => nil } are transformed into this `params` hash: { "user" => { "user" => nil } } and `params["user"]` no longer returns the original parameter value. | ||||
* | Add option for class_attribute default (#29270) | David Heinemeier Hansson | 2017-05-29 | 1 | -2/+1 |
| | | | | | | | | | | | | * Allow a default value to be declared for class_attribute * Convert to using class_attribute default rather than explicit setter * Removed instance_accessor option by mistake * False is a valid default value * Documentation | ||||
* | Wrap store accessors in parameters | Sid Ngeth | 2017-03-21 | 1 | -1/+5 |
| | | | | Modified params wrapper to account for model's stored_attributes | ||||
* | [docs] fix ActionController documentation | Hrvoje Šimić | 2017-03-12 | 1 | -4/+4 |
| | | | | [ci skip] | ||||
* | AC::ParamsWrapper::Options needs anonymous superclass | Akira Matsuda | 2017-01-13 | 1 | -1/+1 |
| | | | | | | it has some methods that override the accessors and calls the original accessors via `super` this partially reverts 9360b6be63b7a452535699bcf6ae853df7f5eea7 | ||||
* | class Foo < Struct.new(:x) creates an extra unneeded anonymous class | Akira Matsuda | 2017-01-13 | 1 | -1/+1 |
| | | | | because Struct.new returns a Class, we just can give it a name and use it directly without inheriting from it | ||||
* | No need to nodoc private methods | Akira Matsuda | 2016-12-24 | 1 | -1/+1 |
| | |||||
* | Add more rubocop rules about whitespaces | Rafael Mendonça França | 2016-10-29 | 1 | -1/+1 |
| | |||||
* | Fix broken comments indentation caused by rubocop auto-correct [ci skip] | Ryuta Kamizono | 2016-09-14 | 1 | -7/+7 |
| | | | | | | All indentation was normalized by rubocop auto-correct at 80e66cc4d90bf8c15d1a5f6e3152e90147f00772. But comments was still kept absolute position. This commit aligns comments with method definitions for consistency. | ||||
* | normalizes indentation and whitespace across the project | Xavier Noria | 2016-08-06 | 1 | -16/+16 |
| | |||||
* | modernizes hash syntax in actionpack | Xavier Noria | 2016-08-06 | 1 | -2/+2 |
| | |||||
* | applies new string literal convention in actionpack/lib | Xavier Noria | 2016-08-06 | 1 | -6/+6 |
| | | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default. | ||||
* | don't deal with `nil` values | Aaron Patterson | 2015-09-22 | 1 | -1/+3 |
| | | | | | We can know whether or not there is a content type object, and just exit early. There is no need to `try` so hard. | ||||
* | Fix params_wrapper doc [ci skip] | Mehmet Emin İNAÇ | 2015-07-26 | 1 | -3/+3 |
| | | | | | | This feature also works with `PUT`, `PATCH` and `DELETE` requests. Also developers can add `:url_encoded_form` and `:multipart_form` into the `:format` for wrapping url encoded or multipart form data. | ||||
* | A few documentation edits [ci skip] | Robin Dupret | 2015-06-15 | 1 | -1/+1 |
| | |||||
* | Spelling/typo/grammatical fixes [ci skip] | karanarora | 2015-05-23 | 1 | -1/+1 |
| | | | | | | | | | | spelling fix [ci skip] example to be consistent [ci skip] grammatical fix typo fixes [ci skip] | ||||
* | [ci skip] Remove comments about Rails 3.1 | claudiob | 2015-05-11 | 1 | -2/+1 |
| | | | | | | | | | Stems from https://github.com/rails/rails/pull/20105#issuecomment-100900939 where @senny said: > From my point of view, all the docs (guides, API) are version bound. > They should describe that version and continue to be available when newer versions are released. > The cross referencing can be done by the interested user. | ||||
* | Doc fix [ci skip] | Sushruth Sivaramakrishnan | 2015-03-05 | 1 | -1/+1 |
| | |||||
* | Remove Struct#to_h backport | Rafael Mendonça França | 2015-01-04 | 1 | -1/+0 |
| | |||||
* | Fix typo in nodoc should be `:nodoc:` for RDoc to parse correctly | Zachary Scott | 2014-12-17 | 1 | -1/+1 |
| | |||||
* | Rephrasing sentences | Neeraj Singh | 2014-10-07 | 1 | -2/+2 |
| | |||||
* | Do not discard query parameters on requests that use wrap_parameters | Josh Jordan | 2014-01-30 | 1 | -4/+11 |
| | |||||
* | Remove warning of circular require | Rafael Mendonça França | 2012-11-27 | 1 | -1/+1 |
| | | | | | | | | | This file was using mime_types before load the Mime::Type class. When trying to register first Mime::Type it load mime_type that loads mime_types in the end. Requiring mime_type ensure that we have the class definition and the mime types | ||||
* | lazily calculate name in the options object | Aaron Patterson | 2012-11-13 | 1 | -14/+18 |
| | |||||
* | move include calculation to include method on the options object | Aaron Patterson | 2012-11-13 | 1 | -9/+24 |
| | |||||
* | model name is lazily evaluated in the options object | Aaron Patterson | 2012-11-13 | 1 | -27/+37 |
| | |||||
* | move the controller class to the options object | Aaron Patterson | 2012-11-13 | 1 | -9/+12 |
| | |||||
* | attribute_names will always return a list, so just use any? | Aaron Patterson | 2012-11-13 | 1 | -1/+1 |
| | |||||
* | wrap up hash conversion in the constructor | Aaron Patterson | 2012-11-13 | 1 | -5/+5 |
| | |||||
* | use the options object in the wrapper defaults | Aaron Patterson | 2012-11-13 | 1 | -13/+12 |
| | |||||
* | start using options object | Aaron Patterson | 2012-11-13 | 1 | -9/+20 |
| | |||||
* | only do hash lookups on options once | Aaron Patterson | 2012-11-13 | 1 | -13/+15 |
| | |||||
* | replace present? with any? to reduce dependency on AS | Aaron Patterson | 2012-11-13 | 1 | -1/+1 |
| | |||||
* | Multiple changes to 1,9 hash syntax | AvnerCohen | 2012-10-27 | 1 | -2/+2 |
| | |||||
* | update AC::ParamsWrapper documentation [ci skip] | Francesco Rodriguez | 2012-09-19 | 1 | -3/+4 |
| | |||||
* | Remove integration between attr_accessible/protected and ↵ | Guillermo Iguaran | 2012-09-16 | 1 | -7/+2 |
| | | | | AC::Metal::ParamsWrapper | ||||
* | load active_support/core_ext/class/attribute in active_support/rails | Xavier Noria | 2012-08-02 | 1 | -1/+0 |
| | |||||
* | Show in log correct wrapped keys | Dmitry Vorotilin | 2012-05-20 | 1 | -1/+2 |
| | |||||
* | Use Hash#fetch instead of has_key? check | Carlos Antonio da Silva | 2012-05-04 | 1 | -1/+1 |
| | |||||
* | Merge pull request #4445 from nragaz/role_based_params_wrapping | José Valim | 2012-05-04 | 1 | -2/+3 |
| | | | | specify a role for identifying accessible attributes when wrapping params | ||||
* | More using <tt>x</tt> instead of +x+ when the latter renders improperly. | Mark Rushakoff | 2012-04-27 | 1 | -1/+1 |
| | |||||
* | Use <tt>Foo::Bar</tt> instead of +Foo::Bar+ | Mark Rushakof | 2012-04-27 | 1 | -1/+1 |
| | | | | | | | | The latter doesn't render as code in HTML output. Regex used in Rubymine to locate the latter form: (\+)(:*\w+:(?::|\w)+)(\+) | ||||
* | Change more Array.wrap to Kernel#Array | Rafael Mendonça França | 2012-01-05 | 1 | -6/+5 |
| | |||||
* | ParamsWrapper only wrap the accessible attributes when they were set | Jean-Francois Turcot | 2011-12-07 | 1 | -1/+8 |
| | |||||
* | use classify in ParamsWrapper to derive model name from controller name | lest | 2011-12-05 | 1 | -1/+1 |
| | |||||
* | Use safe_constantize where possible. | José Valim | 2011-09-23 | 1 | -6/+3 |
| |