Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 519 Bytes

rails-edge-custom-flash-types.md

File metadata and controls

17 lines (12 loc) · 519 Bytes

Rails Edge: Custom Flash Types

Rails just got some syntactic sugar for dealing with flash messages in your controllers and views.

You can now declare the following in your controllers:

class ApplicationController
  add_flash_types :error, :warning
end

And then you'll be able to use <%= error %> in your views and redirect_to .., error: "message" in your controllers.

Commit message: Added support add_flash_types