Module: UsesguidMigrations::ActiveRecordExtensions::Base::ClassMethods
- Defined in:
- lib/usesguid_migrations/active_record_extensions/base.rb
Class Method Summary collapse
Instance Method Summary collapse
- #abstract_class_with_lfe_usesguid_migrations? ⇒ Boolean
- #base_class? ⇒ Boolean
- #pluralized_table_name(table_name) ⇒ Object
Class Method Details
.extended(base) ⇒ Object
10 11 12 13 14 |
# File 'lib/usesguid_migrations/active_record_extensions/base.rb', line 10 def self.extended( base ) class << base alias_method_chain :abstract_class?, :lfe_usesguid_migrations end end |
Instance Method Details
#abstract_class_with_lfe_usesguid_migrations? ⇒ Boolean
16 17 18 |
# File 'lib/usesguid_migrations/active_record_extensions/base.rb', line 16 def abstract_class_with_lfe_usesguid_migrations? abstract_class_without_lfe_usesguid_migrations? || !(name =~ /^Abstract/).nil? end |
#base_class? ⇒ Boolean
20 21 22 |
# File 'lib/usesguid_migrations/active_record_extensions/base.rb', line 20 def base_class? self == base_class end |
#pluralized_table_name(table_name) ⇒ Object
24 25 26 |
# File 'lib/usesguid_migrations/active_record_extensions/base.rb', line 24 def pluralized_table_name( table_name ) ActiveRecord::Base.pluralize_table_names ? table_name.to_s.pluralize : table_name end |