lotus/controller — pull request #56 by jodosha (2014-12-03 18:32:22+00:00)
Title: Flash

Private mechanism to send data across requests.

### Use case

```ruby
require 'lotus/controller'

module Comments
class Index
include Lotus::Action
include Lotus::Action::Session

expose :comments

def call(params)
@comments = CommentRepository.all
end
end

class Create
include Lotus::Action
include Lotus::Action::Session

params do
param :text, type: String, presence: true
end

def call(params)
comment = Comment.new(params)
CommentRepository.create(comment) if params.valid?

redirect_to '/comments'
end
end
end
```

The validation errors caused by `Comments::Create` are available **after the redirect** in the context of `Comments::Index`.

Again, this is marked as private API.

Closes #10