lib/generators/ember/model_generator.rb in ember-appkit-rails-0.1.2 vs lib/generators/ember/model_generator.rb in ember-appkit-rails-0.2.0

- old
+ new

@@ -7,17 +7,16 @@ source_root File.expand_path("../../templates", __FILE__) desc "Creates a new ember.js model" argument :attributes, :type => :array, :default => [], :banner => "field[:type] field[:type] ..." - class_option :ember_path, :type => :string, :aliases => "-d", :default => false, :desc => "Custom ember app path" - def create_model_files - file_path = File.join(ember_path, 'models', class_path, "#{file_name}.js.es6") + file_path = File.join(app_path, 'models', class_path, "#{file_name}.js.es6") template "model.js.es6", file_path end - private + private + EMBER_TYPE_LOOKUP = { nil => 'string', :binary => 'string', :string => 'string', :text => 'string',