Skip to content

Instantly share code, notes, and snippets.

@buk
Created October 24, 2012 12:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save buk/3945707 to your computer and use it in GitHub Desktop.
Save buk/3945707 to your computer and use it in GitHub Desktop.
This is my formotion code
class SettingsController < Formotion::FormController
include SettingsForm
def init
form = get_settings_form
super.initWithForm(form)
end
end
module SettingsForm
def get_settings_form
form = Formotion::Form.new
form.build_section do |section|
section.title = "Title"
end
section.build_row do |row|
row.title = "Label"
row.subtitle = "Placeholder"
row.type = :string
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment