Skip to content

Commit

Permalink
[#591 state:resolved] don't depend on Hobo.rails_initializer
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanlarsen committed Dec 23, 2009
1 parent 87a9665 commit 73f3107
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hobofields/lib/hobo_fields.rb
Expand Up @@ -103,7 +103,7 @@ def enable
# automatically load other rich types from app/rich_types/*.rb
# don't assume we're in a Rails app
if defined?(::Rails)
plugins = Rails.configuration.plugin_loader.new(Hobo.rails_initializer).plugins
plugins = Hobo.try.rails_initializer ? Rails.configuration.plugin_loader.new(Hobo.rails_initializer).plugins : []
([::Rails.root] + plugins.map(&:directory)).each do |dir|
Dir[File.join(dir, 'app', 'rich_types', '*.rb')].each do |f|
# TODO: should we complain if field_types doesn't get a new value? Might be useful to warn people if they're missing a register_type
Expand Down

0 comments on commit 73f3107

Please sign in to comment.