1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

19 commits

Author SHA1 Message Date
Francesco Rodriguez
83482256ef hash filters should be accessed with symbols or strings 2012-11-30 11:24:16 -05:00
Benjamin Quorning
478d80fd57 Test that permitted? is sticky on accessors, mutators, and merges 2012-11-06 21:30:12 +01:00
Benjamin Quorning
1a0f14e045 Test that not permitted is sticky on #except 2012-11-06 21:24:14 +01:00
Benjamin Quorning
93eaffe59b Current tests are testing stickiness of non-permitted parameters 2012-11-06 21:23:24 +01:00
Benjamin Quorning
5b3b9b0ebc Fix buggy tests 2012-11-06 21:22:57 +01:00
David Heinemeier Hansson
750a30b19f No need for the debugger 2012-10-31 16:35:20 +01:00
David Heinemeier Hansson
954c350daf Allow #permit to take its list of permitted parameters as an array 2012-10-31 16:33:54 +01:00
Rafael Mendonça França
0c3ca0f013 Permit string and float values in the multiparameter attributes 2012-10-18 00:31:46 -03:00
dfens
ab9140ff02 Cleanup trailing whitespaces 2012-10-12 09:56:39 +02:00
Santiago Pastorino
bdd105d8b9 When executing permit with just a key that points to a hash, DO NOT allow all the hash
params.require(:person).permit(:projects_attributes) was returning
=> {"projects_attributes"=>{"0"=>{"name"=>"Project 1"}}}

When should return
=> {}

You should be doing ...
params.require(:person).permit(projects_attributes: :name)
to get just the projects attributes you want to allow
2012-10-12 01:01:26 -02:00
Rafael Mendonça França
62aff55706 Allow parameter filters to match multi-parameter attributes
This will make easier to permit date/time attributes generated by
helpers like date_select.

[Sven Schwyn + Rafael Mendonça França]
2012-10-05 18:25:45 -03:00
Brendan Loudermilk
1aa522dc4e ActionController::Parameters#permit! is recursive 2012-10-04 11:51:08 -07:00
Philip Arndt
45d6944afa Correct parameter access.
* The params as supplied pass born in authors[0] but not authors[1] so it seems like the test isn't covering what it should be covering.
2012-09-19 13:46:01 +12:00
Guillermo Iguaran
91bcebbdef Support fields_for attributes, which may have numeric symbols as hash keys 2012-09-16 23:58:21 -05:00
Guillermo Iguaran
1aaf4490b2 Add config.action_controller.permit_all_attributes to bypass StrongParameters protection 2012-09-16 23:58:21 -05:00
Guillermo Iguaran
1e1bee3ab9 Change tainted/untainted wording to permitted/forbidden 2012-09-16 23:58:21 -05:00
Guillermo Iguaran
8cfe95d719 Don't use assert_nothing_raised when assert_equal is used 2012-09-16 23:58:21 -05:00
Guillermo Iguaran
b4d9a586bc require abstract_unit in parameters tests 2012-09-16 23:58:20 -05:00
Guillermo Iguaran
885005461b Integrate ActionController::Parameters from StrongParameters gem 2012-09-16 23:58:19 -05:00