Hi,
Tue Mar 20 12:44:10 EET 2007 Jonathan Buch <jo helloit.fi>
* sql.rb changes
* remove duplicated write_attrs
* made write_attr_boolean return 'f' instead of NULL
* fix require in tc_timestamped
* add :extra_condition to .find (for use with
set_find_options())
i.e. set_find_options(:extra_condition =>
'time_deleted IS NULL')
* fix validate_format
* :where is now handled together with :condition in
find()
use case for :extra_condition
module Preserved
attr_accessor :time_deleted, Time
set_find_options(:extra_condition => 'time_deleted IS
NULL')
alias_method :force_delete, :delete
def delete
time_deleted = Time.now
save
end
def undelete
time_deleted = nil
save
end
end
class Foo
is Preserved
end
Foo.find() # => only finds non-deleted Foos
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
_______________________________________________
Nitro-general mailing list
Nitro-general rubyforge.org
h
ttp://rubyforge.org/mailman/listinfo/nitro-general
|