aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/form_helper_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* added test for form_for with search_fieldAditya Sanghi2010-10-021-0/+15
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Rename duplicated test, and give it a correct name. Remove nonsense line.Emilio Tagua2010-09-281-2/+1
|
* Remove last tests with deprecated form_for and cleanup form_for helperCarlos Antonio da Silva2010-09-261-63/+49
| | | | | | | This cleans up the last bits of deprecation stuff from form_for helper. However there is still a bug when using :as => foo[], with index. The classes and ids are being generated using [], such as foo[]_edit. This bug already existed but it was not detected before.
* Review most of the form_for deprecated tests, missing tests with index like []Carlos Antonio da Silva2010-09-261-405/+321
|
* file_field propagates up multipart property even inside of fields_forSantiago Pastorino2010-09-201-0/+21
|
* argument error is done for usAaron Patterson2010-09-181-0/+6
|
* file_field makes the enclosing form multipartSantiago Pastorino2010-09-181-0/+18
|
* Remove namespace for isolated namespaced models in formsPiotr Sarnacki2010-09-031-0/+17
|
* Extended url_for to handle specifying which router should be used.Piotr Sarnacki2010-09-031-50/+40
| | | | | | | A few examples: url_for Blog::Engine, :posts_path url_for Blog::Engine, @post url_for Blog::Engine, :action => "main", :controller => "index"
* Added :format option for form_for helper and spec for this [#5226 ↵Alex Chrome2010-09-011-2/+18
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* password_field renders with nil value by defaultSantiago Pastorino2010-08-281-1/+4
| | | | | | | | This makes the use of passwords secure by default if you want to render the value of the password_field you have to do for instance f.password_field(:password, :value => @user.password) # => <input type=password id=user_password name=user[password] value=#{@user.password} />
* Make InstanceTagMethods#value_before_type_cast raise if the model don't ↵Santiago Pastorino2010-08-271-0/+13
| | | | | | respond to attr_before_type_cast or attr method [#3374] [#5471 state:committed]
* Revert "It's snowing!"wycats2010-08-181-1/+1
| | | | This reverts commit e4283007d607454acf97301821ba1e1c417bdead.
* It's snowing!Jeremy Kemper2010-08-121-1/+1
|
* Replace snowman with utf8=✓wycats2010-08-111-1/+1
|
* rename _snowman to _ewycats2010-08-091-1/+1
|
* Fix label form helper to use I18n and html options, without the need of ↵Carlos Antonio da Silva2010-08-011-2/+9
| | | | | | | | | | | 'nil' text param: Before: f.label :title, nil, :class => 'title' After : f.label :title, :class => 'title' [#5267 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Makes form_helper use overriden model accessorsSantiago Pastorino2010-08-011-0/+17
| | | | [#3374 state:committed]
* remove size attribute from tag generated by file_field helper [#5084 ↵Miles Egan2010-07-131-0/+5
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Rename _snowman_ to _snowman to be in sync with _method and _csrf_token.José Valim2010-06-291-1/+1
|
* Fix several known web encoding issues:wycats2010-06-271-181/+204
| | | | | | | | | | | | | | | | | | | | | | | * Specify accept-charset on all forms. All recent browsers, as well as IE5+, will use the encoding specified for form parameters * Unfortunately, IE5+ will not look at accept-charset unless at least one character in the form's values is not in the page's charset. Since the user can override the default charset (which Rails sets to UTF-8), we provide a hidden input containing a unicode character, forcing IE to look at the accept-charset. * Now that the vast majority of web input is UTF-8, we set the inbound parameters to UTF-8. This will eliminate many cases of incompatible encodings between ASCII-8BIT and UTF-8. * You can safely ignore params[:_snowman_] TODO: * Validate inbound text to confirm it is UTF-8 * Combine the whole_form implementations in form_helper_test and form_tag_helper_test
* make text_field and hidden_field omit the value attribute if the developer ↵Jeff Dean2010-06-231-0/+10
| | | | | | explicitly passes in :value => nil [#4839 state:resolved] Signed-off-by: Michael Koziarski <michael@koziarski.com>
* test for #4862Neeraj Singh2010-06-221-0/+5
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* form_for without :html and with :remote should not errorDavid Genord II2010-06-181-0/+20
| | | | | | [#4902 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* refactor evals and adds some __FILE__ and __LINE__Santiago Pastorino2010-05-201-3/+2
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Fixed 1 failure in ActionPack testsuite [#4613 state:resolved]Hussein Morsy2010-05-161-2/+2
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Sending :id => nil to form helpers now properly omits the "id" html element ↵Jeff Dean2010-05-151-0/+107
| | | | | | [#4559 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Let label helpers accept blocks.Stephen Celis2010-05-151-3/+7
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Favor %{} in all code instead of (deprecated) {{}} as interpolation syntax ↵Lawrence Pit2010-05-031-3/+3
| | | | | | for I18n Signed-off-by: José Valim <jose.valim@gmail.com>
* fields_for returns block result when outside ERBRyan Bates2010-04-111-0/+5
| | | | Signed-off-by: wycats <wycats@gmail.com>
* Remove input, form, error_messages_for and error_message_on from the ↵José Valim2010-04-101-37/+0
| | | | framework. If you think you will miss them, feel free to use the dynamic_form plugin available at http://github.com/rails/dynamic_form
* fix stack trace lines on class_evalSantiago Pastorino2010-04-091-2/+2
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Rename search_field to test_search_field (ht: Piotr Usewicz)José Valim2010-04-061-1/+1
|
* Added all the new HTML5 form types as individual form tag methods (search, ↵David Heinemeier Hansson2010-04-051-0/+30
| | | | url, number, etc) (Closes #3646) [Stephen Celis]
* changed from :object_name to :as on form_for apiSantiago Pastorino2010-04-051-11/+7
|
* deprecate form_for(symbol_or_string, ...) in favor of :object_name optionSantiago Pastorino2010-04-051-212/+327
|
* Refactored url_for in AV to have its own instances of the helpers instead of ↵wycats2010-04-031-9/+9
| | | | proxying back to the controller. This potentially allows for more standalone usage of AV. It also kicked up a lot of dust in the tests, which were mocking out controllers to get this behavior. By moving it to the view, it made a lot of the tests more standalone (a win)
* Make form helpers work with <%= wycats2010-03-091-70/+74
|
* Require persisted? in ActiveModel::Lint and remove new_record? and ↵José Valim2010-02-211-10/+3
| | | | destroyed? methods. ActionPack does not care if the resource is new or if it was destroyed, it cares only if it's persisted somewhere or not.
* Fix nested attributes with specified collection.José Valim2010-02-071-0/+22
|
* Configuration values should be on AV::Base.José Valim2010-02-021-3/+3
|
* For performance reasons, you can no longer call html_safe! on Strings. ↵Yehuda Katz2010-01-311-1/+1
| | | | | | | | | | | | Instead, all Strings are always not html_safe?. Instead, you can get a SafeBuffer from a String by calling #html_safe, which will SafeBuffer.new(self). * Additionally, instead of doing concat("</form>".html_safe), you can do safe_concat("</form>"), which will skip both the flag set, and the flag check. * For the first pass, I converted virtually all #html_safe!s to #html_safe, and the tests pass. A further optimization would be to try to use #safe_concat as much as possible, reducing the performance impact if we know up front that a String is safe.
* form_for should pass :remote to form_tag through html_optionsStephen St. Martin2010-01-311-0/+19
|
* Move form_remote_tag and remote_form_for into prototype_legacy_helperJoshua Peek2010-01-301-29/+0
|
* Revert "Merge branch 'rails/master' into ujs"Joshua Peek2010-01-301-4/+4
| | | | | | | | | | | This reverts commit 3aa1ea1ae4baa4a03d03644e798eeb98a4745785, reversing changes made to 2c12a71378d2146c822acb389b00b866f6420ff5. Conflicts: actionpack/lib/action_view/helpers/javascript_helper.rb actionpack/lib/action_view/helpers/url_helper.rb actionpack/test/template/url_helper_test.rb
* Removed all helpers from PrototypeHelper that are implemented in AjaxHelper. ↵Erik St. Martin2010-01-271-4/+4
| | | | Modified tests that extended with PrototypeHelper to now extend using AjaxHelper. AjaxHelper is now included by default in view helper
* Allow f.submit to be localized per object.José Valim2010-01-151-1/+19
|
* Custom 'type' attribute support for text_field. [#3646 status:resolved]Stephen Celis2010-01-141-0/+5
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Make check boxes accept :multiple as option so they can handle collections ↵José Valim2010-01-141-0/+13
| | | | (such as HABTM).
* Call :to_model before working with the object.José Valim2010-01-141-2/+2
|