app/models/ecm/staff/position.rb in ecm_staff2-2.0.0 vs app/models/ecm/staff/position.rb in ecm_staff2-3.0.0
- old
+ new
@@ -2,25 +2,17 @@
# associations
has_many :person_positions, dependent: :restrict_with_error
has_many :people, through: :person_positions,
class_name: Ecm::Staff::Configuration.person_class_name
- # # attributes
- # attr_accessible :description,
- # :name,
- # :parent_id
-
# callbacks
after_initialize :set_defaults, if: :new_record?
- # globalization support
- translates :description, :name, :slug
- # attr_accessible :translations, :translations_attributes
- accepts_nested_attributes_for :translations
-
# friendly id support
extend FriendlyId
- friendly_id :name, use: [:slugged, :finders]
+ friendly_id :name, use: [:slugged]
+
+ translates :description, :name, :slug if ActiveRecord::Base.connection.table_exists?(:ecm_staff_position_translations)
# markup support
acts_as_markup language: :variable,
columns: [:description]