File tree Expand file tree Collapse file tree 7 files changed +17
-14
lines changed
actionview/lib/action_view
activesupport/lib/active_support/core_ext/time
railties/lib/rails/generators Expand file tree Collapse file tree 7 files changed +17
-14
lines changed Original file line number Diff line number Diff line change 183
183
* arthurnn*
184
184
185
185
* ` ActionController#translate ` supports symbols as shortcuts.
186
- When shortcut is given it also lookups without action name.
186
+ When a shortcut is given it also performs the lookup without the action
187
+ name.
187
188
188
189
* Max Melentiev*
189
190
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ module DateHelper
70
70
# distance_of_time_in_words(Time.now, Time.now) # => less than a minute
71
71
#
72
72
# With the <tt>scope</tt> option, you can define a custom scope for Rails
73
- # to lookup the translation.
73
+ # to look up the translation.
74
74
#
75
75
# For example you can define the following in your locale (e.g. en.yml).
76
76
#
Original file line number Diff line number Diff line change 6
6
module ActionView
7
7
# = Action View Lookup Context
8
8
#
9
- # <tt>LookupContext</tt> is the object responsible to hold all information required to lookup
10
- # templates, i.e. view paths and details. The LookupContext is also responsible to
11
- # generate a key, given to view paths, used in the resolver cache lookup. Since
12
- # this key is generated just once during the request, it speeds up all cache accesses.
9
+ # <tt>LookupContext</tt> is the object responsible for holding all information
10
+ # required for looking up templates, i.e. view paths and details.
11
+ # <tt>LookupContext</tt> is also responsible for generating a key, given to
12
+ # view paths, used in the resolver cache lookup. Since this key is generated
13
+ # only once during the request, it speeds up all cache accesses.
13
14
class LookupContext #:nodoc:
14
15
attr_accessor :prefixes , :rendered_format
15
16
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ def _render_template(options) #:nodoc:
103
103
view_renderer . render ( context , options )
104
104
end
105
105
106
- # Assign the rendered format to lookup context.
106
+ # Assign the rendered format to look up context.
107
107
def _process_format ( format , options = { } ) #:nodoc:
108
108
super
109
109
lookup_context . formats = [ format . to_sym ]
Original file line number Diff line number Diff line change @@ -36,9 +36,9 @@ def _prefixes # :nodoc:
36
36
self . class . _prefixes
37
37
end
38
38
39
- # <tt>LookupContext</tt> is the object responsible to hold all information required to lookup
40
- # templates, i.e. view paths and details. Check <tt>ActionView::LookupContext</tt> for more
41
- # information.
39
+ # <tt>LookupContext</tt> is the object responsible for holding all
40
+ # information required for looking up templates, i.e. view paths and
41
+ # details. Check <tt>ActionView::LookupContext</tt> for more information.
42
42
def lookup_context
43
43
@_lookup_context ||=
44
44
ActionView ::LookupContext . new ( self . class . _view_paths , details_for_lookup , _prefixes )
Original file line number Diff line number Diff line change @@ -65,7 +65,8 @@ def find_zone!(time_zone)
65
65
if !time_zone || time_zone . is_a? ( ActiveSupport ::TimeZone )
66
66
time_zone
67
67
else
68
- # lookup timezone based on identifier (unless we've been passed a TZInfo::Timezone)
68
+ # Look up the timezone based on the identifier (unless we've been
69
+ # passed a TZInfo::Timezone)
69
70
unless time_zone . respond_to? ( :period_for_local )
70
71
time_zone = ActiveSupport ::TimeZone [ time_zone ] || TZInfo ::Timezone . get ( time_zone )
71
72
end
Original file line number Diff line number Diff line change @@ -103,12 +103,12 @@ def self.hide!
103
103
# hook_for :test_framework, as: :controller
104
104
# end
105
105
#
106
- # And now it will lookup at:
106
+ # And now it will look up at:
107
107
#
108
108
# "test_unit:controller", "test_unit"
109
109
#
110
- # Similarly, if you want it to also lookup in the rails namespace, you just
111
- # need to provide the :in value:
110
+ # Similarly, if you want it to also look up in the rails namespace, you
111
+ # just need to provide the :in value:
112
112
#
113
113
# class AwesomeGenerator < Rails::Generators::Base
114
114
# hook_for :test_framework, in: :rails, as: :controller
You can’t perform that action at this time.
0 commit comments