Why don't you just copy the model over to your new application?

B.

On Mon, Mar 7, 2011 at 1:25 AM, Hemant Bhargava <li...@ruby-forum.com>wrote:

> Hemant Bhargava wrote in post #985888:
> > So rubians :), please help me on it. I think writing plugin is a fair
> > idea.
>
> Now, i thought of writing a plugin. So steps i done:-
> 1) Creates new rails app.
> 2) Creates plugin using ./script/generate plugin "NAME".
>     This will create necessary files in vendor/plugins/"NAME" dir.
> 3) Changed vendor/plugins/"NAME"/init.rb to include the lib file.
> (/lib/"NAME".rb)
>
> 4) My lib/"NAME".rb looks like this.
>     module "NAME"
>       def hello
>         return "hello"
>       end
>       def world
>         return "world"
>       end
>     end
> 5) Creates a model and included the plugin into that model using
> require.
>     require "NAME"
> I think this all is OK upto now. But after it when i go to console and
> type NAME.hello why does'nt it work.. It should work, right? Or i am
> missing something.
>
> Can anyone out there light me up :)
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to