Sha256: 85ca003776f1034d5290259147ab7b726289572f7f80e4f45fd68890f8ec583d

Contents?: true

Size: 367 Bytes

Versions: 6

Compression:

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

6 entries across 6 versions & 2 rubygems

Version Path
rails-backbone-0.7.0 lib/generators/backbone/router/templates/router.coffee
rails-backbone-0.6.1 lib/generators/backbone/router/templates/router.coffee
rails-backbone-0.6.0 lib/generators/backbone/router/templates/router.coffee
rails-backbone-0.6.0.rc lib/generators/backbone/router/templates/router.coffee
rails-backbone-0.5.5 lib/generators/backbone/router/templates/router.coffee
rails-backbone-sp-0.0.1 lib/generators/backbone/router/templates/router.coffee