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

12 commits

Author SHA1 Message Date
José Valim
e3d8331c5b Revert "Remove deprecated form_for with strings or symbols"
This code was not deprecated. What was deprecated is the following:

  form_for(:foo, @foo)

Which now should be rewritten as:

  form_for(@foo, :as => :foo)

The following format is valid:

  form_for(:foo)

This reverts commit be797750e6.
2010-11-18 20:22:14 +01:00
Leonardo Capillera
be797750e6 Remove deprecated form_for with strings or symbols
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-11-18 16:46:55 -02:00
Krekoten' Marjan
da94d0e8ca Remove duplicate helper method
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-25 11:02:46 +02:00
José Valim
ba52748d05 Remove deprecated support to <% form_for %> and several ActionController::Base methods. 2010-08-29 21:08:14 -03:00
wycats
25215d7285 Fix several known web encoding issues:
* 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
2010-06-27 21:13:55 -07:00
Santiago Pastorino
d270da569e changed from :object_name to :as on form_for api 2010-04-05 18:55:37 -03:00
wycats
3eb97531b8 Refactored url_for in AV to have its own instances of the helpers instead of 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) 2010-04-03 02:44:02 -07:00
Carlhuda
d9375f3f30 Modify assert_template to use notifications. Also, remove ActionController::Base#template since it is no longer needed. 2010-03-17 16:29:35 -07:00
Carlhuda
9de83050d3 Add deprecation notices for <% %>.
* The approach is to compile <% %> into a method call that checks whether
    the value returned from a block is a String. If it is, it concats to the buffer and
    prints a deprecation warning.
  * <%= %> uses exactly the same logic to compile the template, which first checks
    to see whether it's compiling a block.
  * This should have no impact on other uses of block in templates. For instance, in
    <% [1,2,3].each do |i| %><%= i %><% end %>, the call to each returns an Array,
    not a String, so the result is not concatenated
  * In two cases (#capture and #cache), a String can be returned that should *never*
    be concatenated. We have temporarily created a String subclass called NonConcattingString
    which behaves (and is serialized) identically to String, but is not concatenated
    by the code that handles deprecated <% %> block helpers. Once we remove support
    for <% %> block helpers, we can remove NonConcattingString.
2010-03-15 14:50:43 -07:00
José Valim
4840acd485 %= works for content_tag and does not require parenthesis on method call 2010-03-12 12:08:23 +01:00
wycats
7b622786fc Make form helpers work with <%= 2010-03-09 23:44:12 -08:00
Carlhuda
4464b8e87b Deprecate block_called_from_erb? pending a solution for getting it into apps 2010-03-09 23:44:12 -08:00