Sha256: 0751af145363c4751038c8e513ff53785ce3a2fd41b5c0a0bd4843948828d4b8

Contents?: true

Size: 591 Bytes

Versions: 4

Compression:

Stored size: 591 Bytes

Contents

module LatoCore

  class Inputs::Form::Cell < Cell

    @@requested_args = [:url]

    @@default_args = {
      method: 'post',
      remote: false,
      class: ''
    }

    def initialize(args = {})
      @args = validate_args(
        args: args,
        requested_args: @@requested_args,
        default_args: @@default_args
      )

      set_conditions
    end

    def open
      render 'open.html'
    end

    def close
      render 'close.html'
    end

    private

      def set_conditions
        @form_method = (@args[:method] === 'get' ? 'get' : 'post')
      end

  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
lato_core-2.1.3 app/cells/lato_core/inputs/form/cell.rb
lato_core-2.1.2 app/cells/lato_core/inputs/form/cell.rb
lato_core-2.1.1 app/cells/lato_core/inputs/form/cell.rb
lato_core-2.1 app/cells/lato_core/inputs/form/cell.rb