Displaying 2 results from an estimated 2 matches for "is_very_new".
2006 May 11
1
acts_as_paranoid and nested scopes in Rails 1.1
...9;' in the plugin directory, renamed it
to ''acts_as_very_new''(just nonsense plugin for testing), and just
simplified the code:
#--------------------------------------------------------------
module VeryNew
#...
module ClassMethods
def acts_as_very_new
unless is_very_new? # don''t let AR call this twice
class << self
alias_method :find_with_old, :find
end
end
include InstanceMethods
end
# end
module InstanceMethods #:nodoc:
def self.included(base) # :nodoc:
base.extend ClassMethods...
2006 May 11
0
acts_as_paranoid, aliasing and nested scopes in Rails 1.1
...al code of acts_as_paranoid can be found
here:
http://svn.techno-weenie.net/projects/plugins/acts_as_paranoid/lib/caboose/acts/paranoid.rb):
#--------------------------------------------------------------BEGIN
module VeryNew
#...
module ClassMethods
def acts_as_very_new
unless is_very_new?
class << self
alias_method :find_with_old, :find
end
end
include InstanceMethods
end
#...
end
module InstanceMethods #:nodoc:
#...
module ClassMethods
def find(*args)
with_very_new_scope { find_with_old(*...