Displaying 2 results from an estimated 2 matches for "new_copi".
Did you mean:
new_copy
2006 Jun 21
1
Plugin Panic! - no accessing a model''s class methods?
Hi plugin-authors.
So this is a little bit of take two on this question, but why can''t I
access a singleton on the model calling my plugin? The crux of the full
plugin below is:
#logger.info self.class.to_s
new_copy = self.class.new( @copyable_attributes )
the logger spits out "Datatype", but I get an error from rails saying:
undefined method `datatype'' for
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 = {} )
copyable_attributes