Skip to content

Commit

Permalink
Reverted 7278376.
Browse files Browse the repository at this point in the history
Since the removal of rails/init.rb, Rails fails to load the helpers.

After investigation, it seems that Rails 2.3.5 handles rails/init.rb in a special way
creating an instance of class GemPlugin < Plugin.
Rails 3 doesn't support that feature, I would have to create a Railtie.

So, let keep this branch compatible with Rails 2.3.x and create a new branch for Rails 3.
  • Loading branch information
weppos committed May 9, 2010
1 parent d6e4683 commit b25885c
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 10 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.rdoc
@@ -1,6 +1,11 @@
= Changelog


== Release 1.0.1

* FIXED: Since the removal of rails/init.rb in 7278376ab77651e540e39552384ad9677e32ff7e, Rails fails to load the helpers.


== Release 1.0.0

* CHANGED: Removed empty install/uninstall hooks and tasks folder.
Expand Down
1 change: 1 addition & 0 deletions Manifest
Expand Up @@ -8,6 +8,7 @@ lib/breadcrumbs_on_rails.rb
lib/breadcrumbs_on_rails/breadcrumbs.rb
lib/breadcrumbs_on_rails/controller_mixin.rb
lib/breadcrumbs_on_rails/version.rb
rails/init.rb
test/breadcrumbs_on_rails_test.rb
test/builder_test.rb
test/element_test.rb
Expand Down
6 changes: 1 addition & 5 deletions init.rb
@@ -1,5 +1 @@
require 'breadcrumbs_on_rails'

ActionController::Base.send :include, BreadcrumbsOnRails::ControllerMixin

Rails.logger.info("** BreadcrumbsOnRails: initialized properly") if defined?(Rails)
require File.join(File.dirname(__FILE__), 'rails', 'init')
6 changes: 3 additions & 3 deletions lib/breadcrumbs_on_rails.rb
Expand Up @@ -20,9 +20,9 @@


module BreadcrumbsOnRails

NAME = 'Breadcrumbs on Rails'
GEM = 'breadcrumbs_on_rails'
AUTHORS = ['Simone Carletti <weppos@weppos.net>']
end

end
2 changes: 1 addition & 1 deletion lib/breadcrumbs_on_rails/controller_mixin.rb
Expand Up @@ -104,4 +104,4 @@ def render_breadcrumbs(options = {}, &block)

end

end
end
2 changes: 1 addition & 1 deletion lib/breadcrumbs_on_rails/version.rb
Expand Up @@ -19,7 +19,7 @@ module BreadcrumbsOnRails
module Version
MAJOR = 1
MINOR = 0
PATCH = 0
PATCH = 1
BUILD = nil

STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
Expand Down
5 changes: 5 additions & 0 deletions rails/init.rb
@@ -0,0 +1,5 @@
require 'breadcrumbs_on_rails'

ActionController::Base.send :include, BreadcrumbsOnRails::ControllerMixin

RAILS_DEFAULT_LOGGER.info("** BreadcrumbsOnRails: initialized properly") if defined?(RAILS_DEFAULT_LOGGER)

0 comments on commit b25885c

Please sign in to comment.