Sha256: a975e1b18c8bc71562ce8a8021751834cf7896e772cc74b5c3b513cf94b409ce
Contents?: true
Size: 547 Bytes
Versions: 1
Compression:
Stored size: 547 Bytes
Contents
# this is needed for now to make mass assignment security compatible with the translation of globalize3 Globalize::ActiveRecord::Translation.class_eval do attr_accessible :locale end class Page < ActiveRecord::Base attr_accessible :body, :description, :title, :blog_post validates_presence_of :title validates_presence_of :description validates_presence_of :body translates :title, :description, :body def to_param title ? "#{id}-#{title.to_url}" : id end scope :by_recent, :order => 'updated_at desc' end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tkh_content-0.0.1 | app/models/page.rb |