# Ddr::Alerts Alerts for the Duke Digital Repository ## Installation Add this line to your application's Gemfile: ```ruby gem 'ddr-alerts' ``` And then execute: $ bundle Or install it yourself as: $ gem install ddr-alerts ## Usage #### Migrations Install the ddr-alerts migrations: rake ddr_alerts:install:migrations then rake db:migrate rake db:test:prepare #### View Partial Ddr::Alerts contains a view partial (ddr/alerts/message/_alert_message.html.erb) that displays the alert messages. This partial depends on the local 'alert_messages' to contain an array of Ddr::Alert::Message which are to be displayed. Render this partial in the desired view / layout of your application, passing in the appropriate value for the 'alert_messages' local. For example, override Blacklight's shared/_flash_messages.html.erb as shown below to include all active alert messages in the 'repository' context above the application's flash messages on each page: ```