Sha256: b0c4c97bd1d4a6a36829c3f195f2e225eeb4356d53610ebb037f226715a3e7b9

Contents?: true

Size: 464 Bytes

Versions: 1

Compression:

Stored size: 464 Bytes

Contents

define [
  'chaplin'
  'lib/view_helper' # Just load the view helpers, no return value
], (Chaplin) ->
  'use strict'

  class View extends Chaplin.View

    # change this method according to your templating system
    getTemplateFunction: ->
      templateFunction = JST[@templateName]
      if typeof @templateName is 'string' and typeof templateFunction isnt 'function'
        throw new Error "View template #{@templateName} not found"

      templateFunction

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
chaplin-on-rails-0.7.0.1 lib/generators/chaplin/install/templates/javascripts/views/base/view.coffee