Sha256: 172839b196a96e54e763d1e54a07f42e014d7d6b1abedb7f1aafb19733f7bf91
Contents?: true
Size: 470 Bytes
Versions: 3
Compression:
Stored size: 470 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 Header < ActiveRecord::Base # attr_accessible :photo, :name validates_presence_of :name translates :name mount_uploader :photo, PhotoUploader def to_param name ? "#{id}-#{name.to_url}" : id end scope :by_recent, -> { order('updated_at desc') } end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
tkh_illustrations-0.9.3 | app/models/header.rb |
tkh_illustrations-0.9.2 | app/models/header.rb |
tkh_illustrations-0.9.1 | app/models/header.rb |