Module: BlacklightUserGeneratedContent::ActiveRecordDuckType::ActiveRecordInstanceMethods
- Defined in:
- lib/blacklight_user_generated_content/active_record_duck_type.rb
Overview
ActiveRecord instance mock methods
Instance Method Summary collapse
- #destroyed? ⇒ Boolean
- #interpolate_and_sanitize_sql(*args) ⇒ Object
- #interpolate_sanitized_sql(*args) ⇒ Object
- #new_record? ⇒ Boolean
- #persisted? ⇒ Boolean
- #quoted_id ⇒ Object
Instance Method Details
#destroyed? ⇒ Boolean
61 62 63 |
# File 'lib/blacklight_user_generated_content/active_record_duck_type.rb', line 61 def destroyed? false end |
#interpolate_and_sanitize_sql(*args) ⇒ Object
51 52 53 54 55 |
# File 'lib/blacklight_user_generated_content/active_record_duck_type.rb', line 51 def interpolate_and_sanitize_sql *args # XXX interpolate_and_sanitize_sql is an ActiveRecord::Base method, # XXX rather than create a mock object or something, just use a model we know a priori exists active_record_model.send :interpolate_and_sanitize_sql, *args end |
#interpolate_sanitized_sql(*args) ⇒ Object
48 49 50 |
# File 'lib/blacklight_user_generated_content/active_record_duck_type.rb', line 48 def interpolate_sanitized_sql *args active_record_model.send :interpolate_sanitized_sql, *args end |
#new_record? ⇒ Boolean
57 58 59 |
# File 'lib/blacklight_user_generated_content/active_record_duck_type.rb', line 57 def new_record? false end |
#persisted? ⇒ Boolean
65 66 67 |
# File 'lib/blacklight_user_generated_content/active_record_duck_type.rb', line 65 def persisted? false end |
#quoted_id ⇒ Object
44 45 46 |
# File 'lib/blacklight_user_generated_content/active_record_duck_type.rb', line 44 def quoted_id ActiveRecord::Base.quote_value id end |