This is an extraction of helpers that we’ve used for some EdgeCase projects that work with the message_block plugin. Mostly it provides alternative flash message keys that we typically use (:success, :notice, :warning, :error). It also includes some slight variations on the styles that come with message_block by default.
script/plugin install git://github.com/adamlogic/message_block_extensions.git script/generate message_block_extensions
flash_and_validation_messages
-
This wraps the call to
message_block
with some alternative defaults. You’ll normally want to stick this in a layout file. show_validation_errors_on(models)
-
Put this at the top of a view to specify which the models to show validation errors on when
flash_and_validation_messages
is called.