lib/vue/generators/vue/store/store_generator.rb in vue-generators-0.1.2 vs lib/vue/generators/vue/store/store_generator.rb in vue-generators-0.1.3
- old
+ new
@@ -4,11 +4,11 @@
def generate_store
[
'Store', 'actions', 'getters', 'mutations', 'state'
].each do |template|
- template "#{template}.template", Rails.root.join("app", "javascript", *path, "#{template}.js")
+ template "#{template}.template", Rails.root.join("app", "javascript", "stores", *path, "#{template}.js")
end
end
private
def store_name
@@ -16,9 +16,9 @@
store = name.split("/").last
store.camelize(:lower) # makesTheFirstLetterLowerCase
end
def path
- name.split("/").map {|part| part.underscore.tr('_', '-') } + ['store']
+ name.split("/").map {|part| part.underscore.tr('_', '-') }
end
end
end