Sha256: 0c90a36df6e01f9ec61f472c521b315d9c85ff312f2eac66abb6d0eef0934912

Contents?: true

Size: 475 Bytes

Versions: 5

Compression:

Stored size: 475 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(deleted: false)

	def destroy
		update_attribute :deleted, true
	end

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
th_simple_content_management-0.2.2 app/models/simple_content_management/simple_route.rb
th_simple_content_management-0.2.1 app/models/simple_content_management/simple_route.rb
th_simple_content_management-0.1.4 app/models/simple_content_management/simple_route.rb
th_simple_content_management-0.1.3 app/models/simple_content_management/simple_route.rb
th_simple_content_management-0.1.2 app/models/simple_content_management/simple_route.rb