Skip to content
This repository has been archived by the owner on Jan 6, 2019. It is now read-only.

Commit

Permalink
Change file naming convention
Browse files Browse the repository at this point in the history
This removes `_router` from the end of the router file, as it's already namespaced in the `routers/` directory. Also changes `accounts/accounts_index.js.coffee`  to `accounts/index.js.coffee` to be more inline with Rails conventions.
  • Loading branch information
Jean Mertz authored and meleyal committed Feb 21, 2012
1 parent 8f75901 commit fb0cf36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/generators/backbone/scaffold/scaffold_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ def create_backbone_collection
end

def create_backbone_router
template "router#{@ext}", File.join(js_path, namespaced_path, "routers", "#{file_name.pluralize}_router#{@ext}")
template "router#{@ext}", File.join(js_path, namespaced_path, "routers", "#{file_name.pluralize}#{@ext}")
end

def create_backbone_view
empty_directory File.join(js_path, namespaced_path, "views", file_name.pluralize)
template "view#{@ext}", File.join(js_path, namespaced_path, 'views', file_name.pluralize, "#{file_name.pluralize}_index#{@ext}")
template "view#{@ext}", File.join(js_path, namespaced_path, 'views', file_name.pluralize, "index#{@ext}")
end

def create_backbone_template
Expand Down

0 comments on commit fb0cf36

Please sign in to comment.