Sha256: 2d5dd8758bf734ecbbafc87b397f26800868666d15e2a277a82ff2c74a404128

Contents?: true

Size: 481 Bytes

Versions: 4

Compression:

Stored size: 481 Bytes

Contents

class SimpleContentManagement::SimpleRoute < ActiveRecord::Base
	validates_uniqueness_of :path

	belongs_to :simple_page, class_name: "SimpleContentManagement::SimplePage"

	attr_accessible :path

	after_save :inform_simple_pages_constraint

	scope :active, where(is_deleted: false)

	def destroy
		update_attribute :is_deleted, true
	end

	private
	def inform_simple_pages_constraint
		SimpleContentManagement::SimplePagesConstraint.instance.route_created_or_updated self
	end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
th_simple_content_management-0.1.1 app/models/simple_content_management/simple_route.rb
th_simple_content_management-0.1.0 app/models/simple_content_management/simple_route.rb
th_simple_content_management-0.0.2 app/models/simple_content_management/simple_route.rb
th_simple_content_management-0.0.1 app/models/simple_content_management/simple_route.rb