Module: DatastaxRails::Scoping
- Extended by:
- ActiveSupport::Autoload, ActiveSupport::Concern
- Included in:
- Base
- Defined in:
- lib/datastax_rails.rb,
lib/datastax_rails/scoping.rb,
lib/datastax_rails/scoping/named.rb,
lib/datastax_rails/scoping/default.rb
Overview
Scopes allow common relation operations to be specified ahead of time allowing for easy, repeatable use elsewhere.
TODO: document some examples here
Defined Under Namespace
Modules: ClassMethods, Default, Named
Instance Method Summary collapse
Instance Method Details
#populate_with_current_scope_attributes ⇒ Object
148 149 150 151 152 153 154 |
# File 'lib/datastax_rails/scoping.rb', line 148 def populate_with_current_scope_attributes return unless self.class.scope_attributes? self.class.scope_attributes.each do |att, value| send("#{att}=", value) if respond_to?("#{att}=") end end |