Created
September 1, 2011 05:36
-
-
Save manishdas/1185518 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
line = CF::Line.create("Bizzcardarmy","Digitization") do |l| | |
# creation of initial input_formats for line with (Company, Website) | |
CF::InputFormat.new({:line => l, :name => "Company", :required => true}) | |
CF::InputFormat.new({:line => l, :name => "Website", :required => true, :valid_type => "url"}) | |
# creation of first station with input_format Company and without Website | |
CF::Station.create({:line => l, :type => "work"}) do |s| | |
CF::HumanWorker.new({:station => s, :number => 1, :reward => 20}) | |
CF::TaskForm.create({:station => s, :title => "Enter the name of CEO", :instruction => "Describe"}) do |i| | |
CF::FormField.new({:form => i, :label => "First Name", :field_type => "short_answer", :required => "true"}) | |
CF::FormField.new({:form => i, :label => "Middle Name", :field_type => "short_answer"}) | |
CF::FormField.new({:form => i, :label => "Last Name", :field_type => "short_answer", :required => "true"}) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment