Sunday, May 29, 2011

[Rails] Re: How to use an ActiveRecord plugin in a non-Rails project

On Sat, May 28, 2011 at 7:32 AM, Josh Cheek <josh.cheek@gmail.com> wrote:

I was thinking I could probably fork it, give it a gemspec, and then tell Bundler to look at my forked repo, does that sound reasonable?


I ended up doing this. https://github.com/JoshCheek/acts_as_list Add one fairly simple file, and now it works with Bundler. Then load it into my app with:

require "active_record/acts/list.rb"
ActiveRecord::Base.send :include, ActiveRecord::Acts::List


I think this was a good solution.

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate