aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge pull request #28844 from ↵Kasper Timm Hansen2017-04-271-1/+1
|\ \ | | | | | | | | | | | | kyuden/remove_unnecessary_attributes_of_select_in_form_with Remove unnecessary `skip_default_ids` and `allow_method_names_outside_object` attributes of select tag in `form_with`
| * | Remove unnecessary `skip_default_ids` and ↵kyuden2017-04-241-1/+1
| |/ | | | | | | `allow_method_names_outside_object` attributes of select tag in `form_with`
* / Fix `current_page?` regression:Edouard CHIN2017-04-261-1/+1
|/ | | | | | - `check_parameters` kwargs was added to the `current_page?` method, the implementation was assuming only hashes responds to `delete`. This was causing issues when `current_page?` was called with a Active Model object - ref https://github.com/rails/rails/pull/27549 - Fixes #28846
* Set to `form_with_generates_remote_forms` only when config is explicitly ↵yuuji.yaginuma2017-04-221-2/+4
| | | | | | | | | specified Without this check, even if config is not specified, `ActionView::Helpers::FormHelper.form_with_generates_remote_forms` always be set to nil and remote form not be generated. Follow up to 128b804c6ce40fcbde744f294f8cb98654f6efec
* Configure form_with_generates_remote_forms in its own initializerRafael Mendonça França2017-04-211-0/+7
| | | | | | | | | This configuration is not present in ActionView::Base so we can't let the action_view.set_configs initializer set it. Also add tests to make sure this config works. Fixes #28824
* Reuse the Parameters#to_h check in the routing helpersRafael Mendonça França2017-04-181-5/+0
| | | | | Since this protection is now in Parameters we can use it instead of reimplementing again.
* Add `form_with_generates_remote_forms` config.Kasper Timm Hansen2017-04-161-1/+3
| | | | | | | Allows users to not have remote forms by default, since there's more JS harness, e.g. bundling rails-ujs, otherwise. Also don't skip creating defaults file anymore. Sprockets isn't the only new config.
* Default embed_authenticity_token_in_remote_forms to nil.Kasper Timm Hansen2017-04-163-8/+10
| | | | | | | Effectively treat nil values as "auto", e.g. whatever a form helper chooses to interpret it as. But treat an explicitly assigned false value as disabling.
* Fix module name [ci skip]yuuji.yaginuma2017-04-151-10/+10
| | | | Replace `FormOptionHelper` to `FormOptionsHelper`.
* Close form_for tag in FormHelper API docsAlex Muller2017-04-131-2/+2
|
* Fix rubocop violationsyuuji.yaginuma2017-04-121-1/+1
|
* Stop complaining about not being able to digest dynamic template partial ↵David Heinemeier Hansson2017-03-221-2/+4
| | | | names and simplify error logging to a single line when not
* Start Rails 5.2 developmentMatthew Draper2017-03-221-2/+2
|
* Fix typo in actionview error messageadamgamble2017-03-171-1/+1
|
* Remove `encode_special_chars` option from `strip_tags`Andrew Hood2017-02-271-4/+10
|
* Preparing for 5.1.0.beta1 releaseRafael Mendonça França2017-02-231-1/+1
|
* Add custom polymorphic mappingAndrew White2017-02-211-4/+4
| | | | | | | | | | | | | | | | Allow the use of `direct` to specify custom mappings for polymorphic_url, e.g: resource :basket direct(class: "Basket") { [:basket] } This will then generate the following: >> link_to "Basket", @basket => <a href="/basket">Basket</a> More importantly it will generate the correct url when used with `form_for`. Fixes #1769.
* Unfreeze interpolated string because it's useless.Stan Lo2017-02-191-1/+1
|
* call `gem` `erubis` before requireyuuji.yaginuma2017-02-011-0/+1
| | | | For inform that need to add `erubis` to gemfile.
* Merge pull request #27795 from meagar/fix-missing-partial-iterationRafael França2017-01-311-1/+1
|\ | | | | Fix missing partial iteration
| * Merge branch 'master' into fix-missing-partial-iterationMatthew Eagar2017-01-255-74/+168
| |\
| * | Add partial iteration variable to template keysMatthew Eagar2017-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | When rendering heterogeneous collection using `render @collection` or `render partial: @collection`, the expected `<partial_name>_iteration` variable is missing due to `find_template` not having the name of the iteration variable included in its cache keys.
* | | Fix inherit from deprecated `ActionView::Template::Handlers::Erubis`Fumiaki MATSUSHIMA2017-02-012-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are some classes inherit from `ActionView::Template::Handlers::Erubis`. (ex. https://github.com/haml/haml/blob/4.0.7/lib/haml/helpers/safe_erubis_template.rb#L3) ``` Class.new(ActionView::Template::Handlers::Erubis) # => TypeError: superclass must be a Class (ActiveSupport::Deprecation::DeprecatedConstantProxy given) ```
* | | Merge pull request #27738 from kenta-s/remove-unused-argument-formatsRafael França2017-01-312-27/+27
|\ \ \ | |_|/ |/| | Remove unused argument `formats`
| * | Remove unused argument `formats`kenta-s2017-01-202-27/+27
| | |
* | | Fix grammar 'an hyphen' -> 'a hyphen' [ci skip]kenta-s2017-01-251-1/+1
| | |
* | | Change ActionView ERB Handler from Erubis to ErubiJeremy Evans2017-01-254-73/+167
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Erubi offers the following advantages for Rails: * Works with ruby's --enable-frozen-string-literal option * Has 88% smaller memory footprint * Does no freedom patching (Erubis adds a method to Kernel) * Has simpler internals (1 file, <150 lines of code) * Has an open development model (Erubis doesn't have a public source control repository or bug tracker) * Is not dead (Erubis hasn't been updated since 2011) Erubi is a simplified fork of Erubis that contains just the parts that are generally needed (which includes the parts that Rails uses). The only intentional difference in behavior is that it does not include support for <%=== tags for debug output. That could be added to the ActionView ERB handler if it is desired. The Erubis template handler remains in a deprecated state so that code that accesses it directly does not break. It can be removed after Rails 5.1.
* | Remove unnecessary comments in cache_helper.rb [ci skip]kenta-s2017-01-211-2/+0
| |
* | `find_templates` should be able to handle 5 argumentskenta-s2017-01-191-2/+2
|/
* Remove TODOs related to Exceptron [ci skip]kenta-s2017-01-181-2/+0
|
* Fix grammar in partial_renderer.rb [ci skip]kenta-s2017-01-181-1/+1
|
* Merge pull request #27665 from kenta-s/improve-compute_asset_extnameRafael França2017-01-181-1/+5
|\ | | | | compute_asset_extname should explicitly return nil in else clause
| * should explicitly returns nil in else clausekenta-s2017-01-131-1/+5
| |
* | Merge pull request #27693 from kenta-s/improve-to_sentence-methodRafael França2017-01-181-1/+1
|\ \ | | | | | | Fix unexpected behavior of `to_sentence` with $,
| * | Fix unexpected behavior of with $,kenta-s2017-01-151-1/+1
| | |
* | | Remove unused variable 'regex'kenta-s2017-01-181-1/+1
| | |
* | | Merge pull request #27692 from y-yagi/make_render_work_with_ac_paramsEileen M. Uchitelle2017-01-161-1/+5
|\ \ \ | | | | | | | | make `render` work with AC::Params
| * | | make `render` work with AC::Paramsyuuji.yaginuma2017-01-151-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 4.2, since AC::Params inherited `Hash`, processing in the case of `Hash` was done. But in 5.x, since AC::Params does not inherit `Hash`, need to add care for AC::Params. Related to 00285e7cf75c96553719072a27c27e4ab7d25b40
* | | | Update comment for Scrubber usage [ci skip]kenta-s2017-01-161-6/+4
| | | |
* | | | Allow render locals to be assigned to instance variablesAndrew White2017-01-151-1/+1
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | In #26672 we blocked use of Ruby keywords as identifiers for view locals but inadvertently broke the use of instance variable names as identifiers. Whilst not explicitly documented this behavior has been around for a long time and there's no need to break it now. Fixes #27480.
* | | Fix broken sample code in action_view/helpers/output_safety_helper.rb [ci skip]kenta-s2017-01-151-1/+1
|/ /
* | Fix grammar in asset_url_helper.rb [ci skip]kenta-s2017-01-131-3/+3
| |
* | Fix typo extention -> extension [ci skip]kenta-s2017-01-131-1/+1
|/
* Reduce string objects by using \ instead of + or << for concatenating stringsAkira Matsuda2017-01-123-5/+5
| | | | (I personally prefer writing one string in one line no matter how long it is, though)
* `self.` is not needed when calling its own instance methodAkira Matsuda2017-01-055-6/+6
| | | | Actually, private methods cannot be called with `self.`, so it's not just redundant, it's a bad habit in Ruby
* Merge pull request #27549 from mpugach/consider_params_in_current_pageRafael França2017-01-041-2/+7
|\ | | | | Add "check_parameters" option to "current_page?"
| * Add `check_parameters` option to `current_page?`Maksym Pugach2017-01-041-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example: For "http://www.example.com/shop/checkout?order=desc&page=1" current_page?('http://www.example.com/shop/checkout') => true current_page?( 'http://www.example.com/shop/checkout', check_parameters: true ) => false
* | Generate indexed names in input even when objects are not persistedRafael Mendonça França2017-01-031-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When you ask to generate multiple nested inputs using: field_for('comments[]', Comment.new) do |c| c.text_field :body Rails should generated the names like `post[comments][][body]`. To make sure we don't have regression the fake models now use the same implementation of `#to_param` as `ActiveRecord::Base` Fixes #26942
* | Prevent duplicate data-disable-with attributesTyler Hunt2017-01-031-14/+18
|/ | | | | | When using the hash form of the data option, prevent duplicate data-disable-with attributes from appearing in the submit tag due to both string and symbol forms of the hash key being present.
* Bump license years for 2017Jon Moss2016-12-311-1/+1
| | | | | | | | Per https://www.timeanddate.com/counters/firstnewyear.html, it's already 2017 in a lot of places, so we should bump the Rails license years to 2017. [ci skip]