aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view
Commit message (Collapse)AuthorAgeFilesLines
* Move slicing to initializer.Kasper Timm Hansen2017-06-072-2/+2
| | | | | | Forgot all about https://github.com/rails/rails/pull/28844/files#r113780934 cc @rafaelfranca
* Use mattr_accessor default: option throughout the projectGenadi Samokovarov2017-06-036-23/+12
|
* Merge pull request #29191 from ↵Kasper Timm Hansen2017-05-291-1/+1
|\ | | | | | | | | bogdanvlviv/pass_params_filename_lineno_to_class_eval Pass params __FILE__ and __LINE__ + 1 if class_eval with <<
| * Pass params __FILE__ and __LINE__ + 1 if class_eval with <<bogdanvlviv2017-05-291-1/+1
| |
* | Add option for class_attribute default (#29270)David Heinemeier Hansson2017-05-295-24/+17
| | | | | | | | | | | | | | | | | | | | | | | | * Allow a default value to be declared for class_attribute * Convert to using class_attribute default rather than explicit setter * Removed instance_accessor option by mistake * False is a valid default value * Documentation
* | Merge pull request #29119 from spohlenz/fix-select-with-enumerableMatthew Draper2017-05-241-1/+1
|\ \ | |/ |/| Fix select tag helper used with Enumerable choices
| * Fix select tag helper used with Enumerable choicesSam Pohlenz2017-05-171-1/+1
| | | | | | | | | | | | Allows a custom object implementing Enumerable to be used as the choices parameter for a select tag, which previously wasn't possible due to the call to `empty?` on the choices (which isn't implemented on Enumerable).
* | Add :json type to auto_discovery_link_tagMike Gunderloy2017-05-201-5/+7
| | | | | | | | | | This allows auto_discovery_link_tag to support the JSON Feed standard. See https://jsonfeed.org/version/1 for more information.
* | Use recyclable cache keys (#29092)David Heinemeier Hansson2017-05-182-10/+18
|/
* Merge pull request #20701 from iamvery/date-helper-argument-errorAndrew White2017-04-271-18/+26
|\ | | | | Ensure input to distance_of_time_in_words is not nil
| * Ensure input to distance_of_time_in_words is not nilJay Hayes2017-04-271-18/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Internally all input is converted to time so that it can be treated uniformly. Remove now-unneeded condition * Now that all input is treated is converted to time, we no longer need to type check it. Rename variables to clarify their purpose Extract private method to normalize distance_of_time args to time Update actionview changelog
* | 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
| | | |