Sha256: 3b8f3c2cb407243b1fbe6db41da6beeb4064a977aea5137f6a390113c22e56a2

Contents?: true

Size: 626 Bytes

Versions: 4

Compression:

Stored size: 626 Bytes

Contents

module PhcdevworksRealEstate
  class Property::Feature < ApplicationRecord

    # Clean URL Initialize
    extend FriendlyId

    # Relationships
    has_and_belongs_to_many :listings, class_name: 'Phcreallistingspro::Property::Listing', :join_table => 'phcdevworks_real_estate_property_features_listings', :dependent => :destroy

    # Validation for Form Fields
    validates :property_feature_name,
      presence: true

    # Clean URL Define
    friendly_id :property_feature_nice_urls, use: [:slugged, :finders]

    def property_feature_nice_urls
      [:property_feature_name]
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
phcdevworks_real_estate-6.0.2 app/models/phcdevworks_real_estate/property/feature.rb
phcdevworks_real_estate-6.0.1 app/models/phcdevworks_real_estate/property/feature.rb
phcdevworks_real_estate-6.0.0 app/models/phcdevworks_real_estate/property/feature.rb
phcdevworks_real_estate-5.2.0 app/models/phcdevworks_real_estate/property/feature.rb