How to override a template file in a gem?

Hello,

I’m working with Refinery 0.9.6.25 which has a small bug in a partial
file. Is there a way to override this file from within my
application’s directory as to fix the bugged line of code?

The file is, from the gem’s working dir,
vendor/plugins/refinery/app/views/shared/admin/_resource_picker.html.erb

I tried freezing the refinery gem in my vendor/gems dir but later
learned it can’t be frozen because it is loaded before the Rails
framework.

CmdJohnson

Found it:

In preinitializer.rb, i modified the last couple of lines:

require “rubygems”
if version
#gem ‘refinerycms’, version
else
#gem ‘refinerycms’
end

require ‘vendor/gems/refinerycms-0.9.6.25/lib/refinery_initializer’


This way the gem is loaded from vendor/gems without looking for system
gems first.

On Sun, Aug 29, 2010 at 8:26 PM, Commander J.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs