Module: BlacklightUserGeneratedContent::ActiveRecordDuckType::ActiveRecordClassMethods
- Defined in:
- lib/blacklight_user_generated_content/active_record_duck_type.rb
Overview
ActiveRecord mock methods
Instance Method Summary collapse
- #base_class ⇒ Object
- #compute_type(type_name) ⇒ Object
- #primary_key ⇒ Object
- #quote_value(*args) ⇒ Object
- #table_exists? ⇒ Boolean
Instance Method Details
#base_class ⇒ Object
20 21 22 |
# File 'lib/blacklight_user_generated_content/active_record_duck_type.rb', line 20 def base_class self end |
#compute_type(type_name) ⇒ Object
28 29 30 |
# File 'lib/blacklight_user_generated_content/active_record_duck_type.rb', line 28 def compute_type(type_name) ActiveSupport::Dependencies.constantize(type_name) end |
#primary_key ⇒ Object
24 25 26 |
# File 'lib/blacklight_user_generated_content/active_record_duck_type.rb', line 24 def primary_key :id end |
#quote_value(*args) ⇒ Object
32 33 34 |
# File 'lib/blacklight_user_generated_content/active_record_duck_type.rb', line 32 def quote_value *args ActiveRecord::Base.quote_value *args end |
#table_exists? ⇒ Boolean
36 37 38 |
# File 'lib/blacklight_user_generated_content/active_record_duck_type.rb', line 36 def table_exists? false end |