lib/generators/ember/model_generator.rb in ember-appkit-rails-0.2.2 vs lib/generators/ember/model_generator.rb in ember-appkit-rails-0.3.0
- old
+ new
@@ -8,10 +8,10 @@
source_root File.expand_path("../../templates", __FILE__)
desc "Creates a new ember.js model"
argument :attributes, :type => :array, :default => [], :banner => "field[:type] field[:type] ..."
def create_model_files
- file_path = File.join(app_path, 'models', class_path, "#{file_name}.js.es6")
+ file_path = File.join(app_path, 'models', class_path, "#{file_name.singularize}.js.es6")
template "model.js.es6", file_path
end
private