Skip to content

Instantly share code, notes, and snippets.

@kkestell
Last active February 21, 2018 12:45
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 kkestell/7a021e85b2e9660ac7243254b1390da3 to your computer and use it in GitHub Desktop.
Save kkestell/7a021e85b2e9660ac7243254b1390da3 to your computer and use it in GitHub Desktop.
post :create do
  doc %(Get a summary of an individual Automation workflow’s settings and
content. The `trigger_settings` object returns information for the first email in
the workflow.

You can use Markdown in these doc strings.

* Foo
* Bar
* Baz)
  
  params do
    param :page, :integer, min: 10, max: 20
    param :foo, :boolean
    param :sort, :string, values: %w[foo bar baz]
    param :quux, :string, required: true
    param :syzygy, :date, default: Date.today
    param :numbers, :integer, array: true
  end
  
  form :post, PostForm
  
  presenter PostPresenter
  
  request do
    present Post.new
  end
end

POST /posts

PostsController#create

Get a summary of an individual Automation workflow’s settings and content. The trigger_settings object returns information for the first email in the workflow.

You can use Markdown in these doc strings.

  • Foo
  • Bar
  • Baz

Parameters

Name Type Array Required Min Max Values Default
page integer 10 20
foo boolean
sort string foo, bar, baz
quux string
syzygy date 2018-02-21
numbers integer

Form

Class

PostForm

Key

post

Presenter

Class

PostPresenter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment