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

17 commits

Author SHA1 Message Date
Piotr Sarnacki
dc663dd52c Don't require action_dispatch in ActionView::UrlHelpers
ActionDispatch::Routing::UrlFor was always required in UrlHelpers. This
was changed by splitting previous implementation of UrlHelper into 2
modules: ActionView::Helpers::UrlHelper and
ActionView::Routing::UrlHelper. The former one keeps only basic
implementation of url_for. The latter adds features that allow to use
routes and is only required when url_helpers or mounted_helpers are
required.
2012-08-28 11:19:29 +02:00
David Heinemeier Hansson
666d3fd0c1 Revert "Merge pull request #7033 from kron4eg/master". Not a a fan at all of what this makes ERB files look like.
This reverts commit 46b8bceedd, reversing
changes made to 2f58795e78.
2012-08-07 11:44:24 -05:00
Artiom Di
e82ffeaa0a Restoring the '%' trim mode for ERb templates, allowing for a leading percent sign on a line to indicate non-inserted Ruby code. 2012-08-07 12:37:56 +03:00
Carlos Antonio da Silva
d1c4acc669 Remove AS declarative extension from erb tag test
The extension was removed in 22bc12ec37,
making "test" an alias for minitest's "it".
2012-07-08 20:10:49 -03:00
Andrey A.I. Sitnik
f3fb416b89 Remove unnecessary in HTML 5 type attribute with default value 2012-04-05 15:32:37 +04:00
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