Sha256: a2aa5c7d1d4066c8dd269f3b01422cfe1be625e4ac62bf8f287c396a2729a18c

Contents?: true

Size: 376 Bytes

Versions: 3

Compression:

Stored size: 376 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.camelize}View()" %>
    $("#<%= plural_name %>").html(@view.render().el)
    
<% end -%>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rails-backbone-0.5.4 lib/generators/backbone/router/templates/router.coffee
rails-backbone-0.5.3 lib/generators/backbone/router/templates/router.coffee
rails-backbone-0.5.2 lib/generators/backbone/router/templates/router.coffee