Module: Ari::ModelHelpers::ClassMethods
- Defined in:
- lib/ari/active_record.rb
Instance Method Summary collapse
- #ari_exclude ⇒ Object
- #ari_functions ⇒ Object
-
#ari_options(options = {}) ⇒ Object
options: :exclude => [‘column_name’, ‘relation_name’] :functions => [‘function’].
Instance Method Details
#ari_exclude ⇒ Object
26 27 28 29 |
# File 'lib/ari/active_record.rb', line 26 def ari_exclude puts "GET EXS" return @ari_exclude || {} end |
#ari_functions ⇒ Object
21 22 23 24 |
# File 'lib/ari/active_record.rb', line 21 def ari_functions puts "GET FOOS" return @ari_functions || {} end |
#ari_options(options = {}) ⇒ Object
options:
:exclude => ['column_name', 'relation_name']
:functions => ['function']
12 13 14 15 16 17 18 19 |
# File 'lib/ari/active_record.rb', line 12 def ( = {}) puts "ARI OPTIONS" @ari_functions ||= {} @ari_exclude ||= {} [:exclude].each { |x| @ari_exclude[x] = true } if [:exclude] [:functions].each { |x| @ari_functions[x] = true } if [:functions] puts "ARI OPTIONS INSPECT : #{@ari_functions} : #{@ari_exclude}" end |