Sha256: e036d7048e18f830f331aca7061c2d4b12cdb36c87e2a89553560fd32336c957
Contents?: true
Size: 390 Bytes
Versions: 2
Compression:
Stored size: 390 Bytes
Contents
class <%= controller_namespace %>Controller extends Backbone.Controller initialize: (options) -> routes: <% actions.each do |action| -%> "/<%= action %>": "<%= action %>" <% end -%> <% actions.each do |action| -%> <%= action %>: -> @view = new <%= "#{view_namespace}.#{action.capitalize}View()" %> $("#<%= plural_name %>").html(@view.render().el) <% end -%>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rails-backbone-0.2.0 | lib/generators/backbone/controller/templates/controller.coffee |
rails-backbone-0.1.2 | lib/generators/backbone/controller/templates/controller.coffee |