Skip to content
This repository was archived by the owner on Jul 20, 2026. It is now read-only.
lkhoward edited this page Mar 15, 2016 · 4 revisions

Flows are how Huzzah defines user interactions across multiple pages of your application or across pages of multiple sites.

class Payment < Huzzah::Flow

  def send_to(user, amount)
    moolah.login_page.login
    moolah.user_account.send_payment(user, amount)
  end

end

Huzzah uses the class name of the flow (Payment) to generate a method that provides access to the methods that you defined within the flow. In this case, class Payment becomes method payment within the Huzzah::Role object.

The syntax to call a flow is role.flow.method or in this case:

user.payment.send_to('carey.braun@okon.co', '5.00')

NOTE: Flows have access to all Sites and all other Flows.

Clone this wiki locally