Sha256: 97abd20ab0cc26c171053943cac3ffae5346a9daf38937618a48f49a1780ada4

Contents?: true

Size: 366 Bytes

Versions: 10

Compression:

Stored size: 366 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

10 entries across 10 versions & 3 rubygems

Version Path
bbr-wsm-1.1.0 lib/generators/backbone/router/templates/router.coffee
rails-backbone-1.2.0 lib/generators/backbone/router/templates/router.coffee
railsy_backbone-0.0.5 lib/generators/backbone/router/templates/router.coffee
railsy_backbone-0.0.4 lib/generators/backbone/router/templates/router.coffee
railsy_backbone-0.0.3 lib/generators/backbone/router/templates/router.coffee
rails-backbone-0.9.10 lib/generators/backbone/router/templates/router.coffee
rails-backbone-0.9.0 lib/generators/backbone/router/templates/router.coffee
rails-backbone-0.8.0 lib/generators/backbone/router/templates/router.coffee
rails-backbone-0.7.2 lib/generators/backbone/router/templates/router.coffee
rails-backbone-0.7.1 lib/generators/backbone/router/templates/router.coffee