meleyal / backbone-on-rails

A simple gem for using Backbone.js with Rails.
MIT License
810 stars 126 forks source link

scaffold file naming changed #33

Closed drale2k closed 11 years ago

drale2k commented 11 years ago

I noticed that when i scaffold a resource, lets say "users", earlier it named files like

"users_index.js.coffee" and "users_router.js.coffee"

now it does

"index.js.coffee" and "users.js.coffee"

Is this by accident?

drale2k commented 11 years ago

OK i found the commit for this https://github.com/meleyal/backbone-on-rails/commit/fb0cf36cb33651e97e5494a70df80bb7f372f49f#lib/generators/backbone/scaffold/scaffold_generator.rb

Are you sure this is a good way for naming? It is pretty confusing when you have open the router, a view, template and model and they all have the same filename

meleyal commented 11 years ago

Yes, maybe this is a mistake.

I think we should stick to the thoughbot naming, even though it's more verbose: https://github.com/thoughtbot/backbone-js-on-rails/tree/master/example_app/app/assets/javascripts

I'll revert this in the next release.

meleyal commented 11 years ago

Latest version of book: https://github.com/thoughtbot/backbone-js-on-rails/blob/master/book/rails_integration/file_organization.md