Plugins - ActiveRecord Database Functions
Add to favoritesThis plugin will enable the use of built-in database functions through ActiveRecord.
Example:
>> User.new
>> user.password = ActiveRecord::Base::DBFunction.new( :password, 'secret' )
>> user.save
>> user.password
=> "428567f408994404"
Example 2:
>> class User < ActiveRecord::Base; def password=( pass ); super DBFunction( :password, pass ); end; end
>> user = User.new
>> user.password = 'secret'
>> user.save
>> user.password
=> "428567f408994404"
