Module: RuoteKit::Helpers::MiscHelpers
- Defined in:
- lib/ruote-kit/helpers/misc_helpers.rb
Instance Method Summary collapse
Instance Method Details
#respond_with(template) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/ruote-kit/helpers/misc_helpers.rb', line 9 def respond_with(template) respond_to do |format| format.html { haml(template) } format.json { json(template) } end end |
#sample_process ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/ruote-kit/helpers/misc_helpers.rb', line 17 def sample_process %{ Ruote.process_definition :name => 'test', :revision => '0.1' do sequence do alice :task => 'clean car' bob :task => 'sell car' end end }.strip end |
#sample_process_tree ⇒ Object
28 29 30 31 |
# File 'lib/ruote-kit/helpers/misc_helpers.rb', line 28 def sample_process_tree Rufus::Json.encode(Ruote::Reader.read(sample_process)) end |