search for: pagemetadata

Displaying 1 result from an estimated 1 matches for "pagemetadata".

2007 Mar 17
4
Created_on and updated_on in a non-ActiveRecord model
...I''ve tried to set the before_create and before_updated methods but they does not work (see code below). So… is there any way to do it automatically? Thanks. ******* [1] http://wiki.rubyonrails.org/rails/pages/HowToUseValidationsWithoutExtendingActiveRecord , Alternative 2. CODE: class PageMetadata < ActiveRecord::Base def self.columns() @columns ||= []; end def self.column(name, sql_type = nil, default = nil, null = true) columns << ActiveRecord::ConnectionAdapters::Column.new(name.to_s, default, sql_type.to_s, null) end column :abstract, :string column :title, :string column...