search for: acts_as_copyable

Displaying 2 results from an estimated 2 matches for "acts_as_copyable".

2006 Jun 21
1
Plugin Panic! - no accessing a model''s class methods?
...module Copyable #:nodoc: def self.append_features(base) super base.extend(MacroMethods) end # declare the class level helper methods which # will load the relevant instance methods # defined below when invoked module MacroMethods def acts_as_copyable include FakeActiveRecord::Acts::Copyable::InstanceMethods end end # Adds instance methods. module InstanceMethods def copy( options = {} ) @copyable_attributes = self.attributes @copyable_attributes.delete ''id''...
2006 Jun 05
0
Plugin Namespace Oddities?
Hi all, I''m trying to throw together an acts_as_copyable, to add the ability to: @new_ar_object = @ar_object.copy I''m using the Fox example for the basic loading into AR with a module: http://wiki.rubyonrails.org/rails/pages/HowToWriteAnActsAsFoxPlugin so in my instance methods: module InstanceMethods def copy( options = {...