Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- app/models/array.rb,
app/models/user_group_membership_mixins/validity_range.rb
Overview
This patches the basic Array object.
Instance Method Summary collapse
-
#reload ⇒ Object
Pass the
reloadto all objects in the array if they respond toreload. - #started_after(time) ⇒ Object
Instance Method Details
#reload ⇒ Object
Pass the reload to all objects in the array if they respond to reload.
This is used in model caching. See, for exmaple, app/models/cache_store_extension.rb.
11 12 13 |
# File 'app/models/array.rb', line 11 def reload collect { |element| element.reload if element.respond_to?(:reload) } end |
#started_after(time) ⇒ Object
203 204 205 |
# File 'app/models/user_group_membership_mixins/validity_range.rb', line 203 def started_after(time) self.select { |membership| membership.valid_from && membership.valid_from >= time } end |