Odd, I did look first. Not sure how I missed it. thx!!!

On Sun, Oct 2, 2011 at 7:00 PM, Bruno Bornsztein
<bruno.bornszt...@gmail.com> wrote:
> It's already there!
> https://github.com/bborn/communityengine/blob/rails3/lib/community_engine/engines_extensions.rb
>
> On Mon, Sep 26, 2011 at 2:22 PM, mike muldoon <mike.muld...@gmail.com>
> wrote:
>>
>> I didn't find any explanation of why this changed from Rails 2.x, so I
>> can't debate the strategy's merits.
>>
>> However, being selective certainly appeals to me. Can you post that
>> helper code, please?
>>
>> On Mon, Sep 26, 2011 at 5:23 AM, Bruno Bornsztein
>> <bruno.bornszt...@gmail.com> wrote:
>> > Hmmm... I'm not sure I prefer the approach of auto-overriding
>> > everything. I
>> > added a helper method called "require_from_ce" that lets you selectively
>> > include a CE class to override. For example
>> > require_from_ce 'models/post'
>> > class Post < ActiveRecord::Base
>> >  ... your stuff here ...
>> > end
>> >
>> >
>> >
>> >
>> > On Sun, Sep 25, 2011 at 8:40 PM, d00n <mike.muld...@gmail.com> wrote:
>> >>
>> >> Another big wrinkle. In Rails 3, engine classes load after your stuff
>> >> in /app, which breaks the old method of overriding/extending CE.
>> >>
>> >> The fix below patches the loading process. Replace YOUR_APP_NAME as
>> >> needed, and place this code in /config/application.rb, after this
>> >> line:
>> >> require 'rails/all'
>> >>
>> >> The patch:
>> >>
>> >> require 'active_support/dependencies'
>> >> module ActiveSupport::Dependencies
>> >>  alias_method :require_or_load_without_multiple, :require_or_load
>> >>  def require_or_load(file_name, const_path = nil)
>> >>    if file_name.starts_with?(Rails.root.to_s + '/app')
>> >>      relative_name = file_name.gsub(Rails.root.to_s, '')
>> >>      @engine_paths ||=
>> >> YOUR_APP_NAME::Application.railties.engines.collect{|engine|
>> >> engine.config.root.to_s }
>> >>      @engine_paths.each do |path|
>> >>        engine_file = File.join(path, relative_name)
>> >>        require_or_load_without_multiple(engine_file, const_path) if
>> >> File.file?(engine_file)
>> >>      end
>> >>    end
>> >>    require_or_load_without_multiple(file_name, const_path)
>> >>  end
>> >> end
>> >>
>> >> More reading:
>> >>
>> >>
>> >> http://www.cowboycoded.com/2011/02/28/why-you-cant-reopen-rails-3-engine-classes-from-the-parent-app/
>> >>
>> >> On Sep 25, 1:49 pm, d00n <mike.muld...@gmail.com> wrote:
>> >> > Started!
>> >> >
>> >> > I have finished the database updates, including the migration from
>> >> > attachmentfu to paperclip. I plan on cleaning this code up and
>> >> > parking
>> >> > it somewhere, but if anybody needs help now (anybody else on an Oct
>> >> > 1st deadline, too?), I can expedite your adventure.
>> >> >
>> >> > However, I'm knee deep in the merge, and I won't have time to
>> >> > document
>> >> > this properly until I get this pushed to production.
>> >> >
>> >> > On Sep 12, 9:11 am, Bruno Bornsztein <bruno.bornszt...@gmail.com>
>> >> > wrote:
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > > I've migrated one site (it's not public yet, so I can't point you
>> >> > > to
>> >> > > it),
>> >> > > that was a pretty basic CE install with a few customizations. It
>> >> > > wasn't too
>> >> > > bad, but the main thing what made it easier was not having to
>> >> > > migrate
>> >> > > any
>> >> > > content, and not having to update very many customized view
>> >> > > templates.
>> >> >
>> >> > > CE 2 uses Paper clip for file uploads, so that will complicate any
>> >> > > migration
>> >> > > of an app with existing photos/user avatars etc. You'll probably
>> >> > > have
>> >> > > to
>> >> > > write some custom code to either migrate the locations of the
>> >> > > existing
>> >> > > files, or override the appropriate models to account for the legacy
>> >> > > files.
>> >> >
>> >> > > Hope that helps
>> >> > > bruno
>> >> >
>> >> > > On Fri, Sep 9, 2011 at 4:22 PM, d00n <mike.muld...@gmail.com>
>> >> > > wrote:
>> >> > > > Hello all,
>> >> >
>> >> > > > Has anyone migrated an existing CE install from 1.0.4.2 to
>> >> > > > 2.0.0.beta?
>> >> >
>> >> > > > I'm faced with the looming FB OAuth 2.0 migration deadline on Oct
>> >> > > > 1,
>> >> > > > and considering using my limited time to jump ship to Rails 3.1
>> >> > > > instead of updating the CEFB plugin.
>> >> >
>> >> > > > thx!
>> >> > > > Mike
>> >> >
>> >> > > > --
>> >> > > > You received this message because you are subscribed to the
>> >> > > > Google
>> >> > > > Groups
>> >> > > > "CommunityEngine" group.
>> >> > > > To post to this group, send email to
>> >> > > > communityengine@googlegroups.com.
>> >> > > > To unsubscribe from this group, send email to
>> >> > > > communityengine+unsubscr...@googlegroups.com.
>> >> > > > For more options, visit this group at
>> >> > > >http://groups.google.com/group/communityengine?hl=en.
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> >> Groups
>> >> "CommunityEngine" group.
>> >> To post to this group, send email to communityengine@googlegroups.com.
>> >> To unsubscribe from this group, send email to
>> >> communityengine+unsubscr...@googlegroups.com.
>> >> For more options, visit this group at
>> >> http://groups.google.com/group/communityengine?hl=en.
>> >>
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "CommunityEngine" group.
>> > To post to this group, send email to communityengine@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > communityengine+unsubscr...@googlegroups.com.
>> > For more options, visit this group at
>> > http://groups.google.com/group/communityengine?hl=en.
>> >
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "CommunityEngine" group.
>> To post to this group, send email to communityengine@googlegroups.com.
>> To unsubscribe from this group, send email to
>> communityengine+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/communityengine?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "CommunityEngine" group.
> To post to this group, send email to communityengine@googlegroups.com.
> To unsubscribe from this group, send email to
> communityengine+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/communityengine?hl=en.
>

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

Reply via email to