diff --git a/hobofields/lib/hobo_fields.rb b/hobofields/lib/hobo_fields.rb index 4d7147319..e1829f530 100644 --- a/hobofields/lib/hobo_fields.rb +++ b/hobofields/lib/hobo_fields.rb @@ -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