Sha256: 547300df6571c2a34f10aee3bc2783d01d085420fad1ed85e709648d4a5100ab

Contents?: true

Size: 471 Bytes

Versions: 40

Compression:

Stored size: 471 Bytes

Contents

Rev.registerComponent 'Form',

  render: ->
    className = @classAdd
      "RevForm": true

    <form {...@props} className={className} method={@getSupportedMethod()}>
      <Rev.Components.AuthenticityToken />
      <Rev.Components.MethodOverride method={@props.method?.toUpperCase() or 'GET'} />
      {@props.children}
    </form>

  getSupportedMethod: ->
    method = @props.method?.toUpperCase()
    method ||= 'GET'
    if method == 'GET' then method else 'POST'

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
revelry_core-0.1.11.6 app/assets/javascripts/revelry/ui/forms/Form.js.cjsx
revelry_core-0.1.11.5 app/assets/javascripts/revelry/ui/forms/Form.js.cjsx
revelry_core-0.1.11.2 app/assets/javascripts/revelry/ui/forms/Form.js.cjsx
revelry_core-0.1.11.1 app/assets/javascripts/revelry/ui/forms/Form.js.cjsx
revelry_core-0.1.11.0 app/assets/javascripts/revelry/ui/forms/Form.js.cjsx
revelry_core-0.1.10.7 app/assets/javascripts/revelry/ui/forms/Form.js.cjsx
revelry_core-0.1.10.6 app/assets/javascripts/revelry/ui/forms/Form.js.cjsx
revelry_core-0.1.10.5 app/assets/javascripts/revelry/ui/forms/Form.js.cjsx
revelry_core-0.1.10.4 app/assets/javascripts/revelry/ui/forms/Form.js.cjsx
revelry_core-0.1.10.3 app/assets/javascripts/revelry/ui/forms/Form.js.cjsx
revelry_core-0.1.10.2 app/assets/javascripts/revelry/ui/forms/Form.js.cjsx
revelry_core-0.1.10.1 app/assets/javascripts/revelry/ui/forms/Form.js.cjsx
revelry_core-0.1.10.0 app/assets/javascripts/revelry/ui/forms/Form.js.cjsx
revelry_core-0.1.9.2 app/assets/javascripts/revelry/ui/forms/Form.js.cjsx
revelry_core-0.1.9.1 app/assets/javascripts/revelry/ui/forms/Form.js.cjsx
revelry_core-0.1.9.0 app/assets/javascripts/revelry/ui/forms/Form.js.cjsx
revelry_core-0.1.8.6 app/assets/javascripts/revelry/ui/forms/Form.js.cjsx
revelry_core-0.1.8.5 app/assets/javascripts/revelry/ui/forms/Form.js.cjsx
revelry_core-0.1.8.4 app/assets/javascripts/revelry/ui/forms/Form.js.cjsx
revelry_core-0.1.8.3 app/assets/javascripts/revelry/ui/forms/Form.js.cjsx