Sha256: 7f298125f8b1d971dccd2b90dc293b9983b61dfbf8e8d1a35f9d45a4a034368e

Contents?: true

Size: 696 Bytes

Versions: 5

Compression:

Stored size: 696 Bytes

Contents

class App.Base

  constructor: ->
    if (window.jQuery) then RailsScript.setClearEventHandlers() # clearing application event handlers only possible with jQuery
    return this


  ###
  Run the new action for the create action.  Generally the create action will 'render :new' if there was a problem.
  This prevents doubling the code for each action.
  ###
  create: ->
    if typeof $this.new == 'function'
      return $this.new()


  ###
  Run the edit action for the update action.  Generally the update action will 'render :edit' if there was a problem.
  This prevents doubling the code for each action.
  ###
  update: ->
    if typeof $this.edit == 'function'
      return $this.edit()

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rails_script-2.0.4 app/assets/javascripts/base.coffee
rails_script-2.0.3 app/assets/javascripts/base.coffee
rails_script-2.0.2 app/assets/javascripts/base.coffee
rails_script-2.0.1 app/assets/javascripts/base.coffee
rails_script-2.0.0 app/assets/javascripts/base.coffee