Sha256: 128dadf6dd6929bc8a5ccabe3a23abb8c8c37b0508e7359430070cdc67063acd

Contents?: true

Size: 387 Bytes

Versions: 16

Compression:

Stored size: 387 Bytes

Contents

class User
  include Formotion::Formable

  attr_accessor :name, :score, :team

  form_property :name, :string
  form_property :score, :number, transform: lambda { |value| value.to_i }

  form_property :team, :picker, items: ["Red", "Blue", "Green"]

  form_title "Edit User"

  def initialize(name, score, team)
    self.name = name
    self.score = score
    self.team = team
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
formotion-1.8 examples/FormModel/app/user.rb
formotion-1.7 examples/FormModel/app/user.rb
formotion-1.6 examples/FormModel/app/user.rb
formotion-1.5.1 examples/FormModel/app/user.rb
formotion-1.5.0 examples/FormModel/app/user.rb
formotion-1.4.0 examples/FormModel/app/user.rb
formotion-1.3.1 examples/FormModel/app/user.rb
formotion-1.3 examples/FormModel/app/user.rb
formotion-1.2 examples/FormModel/app/user.rb
formotion-1.1.5 examples/FormModel/app/user.rb
formotion-1.1.4 examples/FormModel/app/user.rb
formotion-1.1.3 examples/FormModel/app/user.rb
formotion-1.1.2 examples/FormModel/app/user.rb
formotion-1.1.1 examples/FormModel/app/user.rb
formotion-1.1 examples/FormModel/app/user.rb
formotion-1.0 examples/FormModel/app/user.rb