Module: Sequel::Plugins::DefaultOrder::ClassMethods
- Defined in:
- lib/sequel/plugins/default_order.rb
Instance Attribute Summary collapse
-
#custom_default_order ⇒ Object
readonly
Returns the value of attribute custom_default_order.
Instance Method Summary collapse
Instance Attribute Details
#custom_default_order ⇒ Object (readonly)
Returns the value of attribute custom_default_order.
7 8 9 |
# File 'lib/sequel/plugins/default_order.rb', line 7 def custom_default_order @custom_default_order end |
Instance Method Details
#default_order(order) ⇒ Object
9 10 11 12 13 |
# File 'lib/sequel/plugins/default_order.rb', line 9 def default_order(order) @custom_default_order = order self.dataset = self.dataset.order(order) end |
#with_original_dataset ⇒ Object
15 16 17 |
# File 'lib/sequel/plugins/default_order.rb', line 15 def with_original_dataset self.db[self.table_name] end |