aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/record_identifier.rb
Commit message (Collapse)AuthorAgeFilesLines
* Enable `Layout/EmptyLinesAroundAccessModifier` copRyuta Kamizono2019-06-131-1/+0
| | | | | | | | | | | We sometimes say "✂️ newline after `private`" in a code review (e.g. https://github.com/rails/rails/pull/18546#discussion_r23188776, https://github.com/rails/rails/pull/34832#discussion_r244847195). Now `Layout/EmptyLinesAroundAccessModifier` cop have new enforced style `EnforcedStyle: only_before` (https://github.com/rubocop-hq/rubocop/pull/7059). That cop and enforced style will reduce the our code review cost.
* Add `Style/RedundantFreeze` to remove redudant `.freeze`Yasuo Honda2018-09-291-2/+2
| | | | | | | | | | | | | | | | | | | | | Since Rails 6.0 will support Ruby 2.4.1 or higher `# frozen_string_literal: true` magic comment is enough to make string object frozen. This magic comment is enabled by `Style/FrozenStringLiteralComment` cop. * Exclude these files not to auto correct false positive `Regexp#freeze` - 'actionpack/lib/action_dispatch/journey/router/utils.rb' - 'activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb' It has been fixed by https://github.com/rubocop-hq/rubocop/pull/6333 Once the newer version of RuboCop released and available at Code Climate these exclude entries should be removed. * Replace `String#freeze` with `String#-@` manually if explicit frozen string objects are required - 'actionpack/test/controller/test_case_test.rb' - 'activemodel/test/cases/type/string_test.rb' - 'activesupport/lib/active_support/core_ext/string/strip.rb' - 'activesupport/test/core_ext/string_ext_test.rb' - 'railties/test/generators/actions_test.rb'
* [Action View] require_relative => requireAkira Matsuda2017-10-211-1/+1
| | | | This basically reverts c4d1a4efeec6f0b5b58222993aa0bec85a19b6a8
* Use frozen string literal in actionview/Kir Shatrov2017-07-241-0/+2
|
* [Action View] require => require_relativeAkira Matsuda2017-07-011-1/+1
|
* Privatize unneededly protected methods in Action ViewAkira Matsuda2016-12-241-2/+2
|
* applies new string literal convention in actionview/libXavier Noria2016-08-061-4/+4
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* do not use `div_for` in example [ci skip]yuuji.yaginuma2015-12-221-8/+9
| | | | `div_for` removed in 01e94ef
* fix typo intance -> instance in ActionView [ci skip] amitkumarsuroliya2015-09-131-1/+1
| | | `intance` should be `instance`
* Use existing constant for joining instead of '_'Prathamesh Sonpatki2015-01-181-1/+1
|
* Tiny documentation fixes [ci skip]Robin Dupret2014-12-301-3/+4
|
* Better docs for AV::RecordIdentifierclaudiob2014-12-231-18/+42
| | | | | | | | | | | | | | | | | | | | | | | | | This commit intends to clarify the scope of ActionView::RecordIdentifier methods `dom_id` and `dom_class`. Most of the current documentation comes from da257eb8 (7 years ago) when the decoupling of ActionView, ActiveRecord and ActiveModel was not a concern. Since then, steps have been taken to reach such decoupling, especially 8ca17926 which duplicated ActionController::ModelNaming into ActionView::ModelNaming explaining that: > These are just a simple helpers for decoupling Active Model, so it does not > make sense to extract it to Active Support, but the point is to decouple also > Action View and Action Pack As of today, ActionView::RecordIdentifier only includes `dom_id` and `dom_class` so it makes sense to explicitly document those two methods, and leaving the details of helpers like `div_for` in the corresponding files. Moreover, I think it's important to mention in the documentation that ActionView::RecordIdentifier **does not strictly depend on the ActiveRecord API**: any class `Post` implementing `post.to_key` and `post.model_name.param_key` will work. [ci skip]
* Move actionpack/lib/action_view* into actionview/libPiotr Sarnacki2013-06-201-0/+84