Announcement plugin to include 'hello bar' into your app, for Ruby on Rails. Based on paul_revere.
You can show message in a specific time, inform users about news on the web and measure all clicks.
Install with the asset pipeline (Rails 3.1+, asset pipeline enabled)
Add this line to your application's Gemfile:
Run the generator to create the migration and routes:
rails generate hello_bar
Add the default announcement CSS to
//= require announcements
Add the helper to
<%= hello_bar %>
Run the migration:
A model called
Announcement, which has columns:
- message (text column)
- link (string columns, mandtory)
- starts_at and ends_at (datetime columns, mandatory) You can use method "current" announcement.
A helper called
#hello_bar, which will return current announcement.
Tracking into Google Analytics event
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Added some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request