lib/ember-cli/railtie.rb in ember-cli-rails-0.0.3 vs lib/ember-cli/railtie.rb in ember-cli-rails-0.0.4

- old
+ new

@@ -1,21 +1,25 @@ module EmberCLI class Railtie < Rails::Railtie - initializer "ember-cli-rails.rack-server" do - EmberCLI.prepare! if development_mode? - end - initializer "ember-cli-rails.view_helpers" do ActionView::Base.send :include, ViewHelpers end initializer "ember-cli-rails.inflector" do ActiveSupport::Inflector.inflections(:en) do |inflect| inflect.acronym "CLI" end end - def development_mode? + initializer "ember-cli-rails.rack-server" do + EmberCLI.enable! if non_production? + end + + rake_tasks do + require "ember-cli/rake_task" + end + + def non_production? !Rails.env.production? && Rails.configuration.consider_all_requests_local end end end