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
- #pluralize_table_names ⇒ Object
- #primary_key ⇒ Object
- #quote_value(*args) ⇒ Object
- #table_exists? ⇒ Boolean
Instance Method Details
#base_class ⇒ Object
22 23 24 |
# File 'lib/blacklight_user_generated_content/active_record_duck_type.rb', line 22 def base_class self end |
#compute_type(type_name) ⇒ Object
30 31 32 |
# File 'lib/blacklight_user_generated_content/active_record_duck_type.rb', line 30 def compute_type(type_name) ActiveSupport::Dependencies.constantize(type_name) end |
#pluralize_table_names ⇒ Object
42 43 44 |
# File 'lib/blacklight_user_generated_content/active_record_duck_type.rb', line 42 def pluralize_table_names false end |
#primary_key ⇒ Object
26 27 28 |
# File 'lib/blacklight_user_generated_content/active_record_duck_type.rb', line 26 def primary_key :id end |
#quote_value(*args) ⇒ Object
34 35 36 |
# File 'lib/blacklight_user_generated_content/active_record_duck_type.rb', line 34 def quote_value *args ActiveRecord::Base.quote_value *args end |
#table_exists? ⇒ Boolean
38 39 40 |
# File 'lib/blacklight_user_generated_content/active_record_duck_type.rb', line 38 def table_exists? false end |