Sha256: 525da2aee12a28f84483fa487b8919861d535553dfa84a74fa871cf42e6c5d62

Contents?: true

Size: 378 Bytes

Versions: 2

Compression:

Stored size: 378 Bytes

Contents

class <%= router_namespace %>Router extends Backbone.Router
  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.5.1 lib/generators/backbone/router/templates/router.coffee
rails-backbone-0.5.0 lib/generators/backbone/router/templates/router.coffee