Project

hello_bar

0.01
No commit activity in last 3 years
No release in over 3 years
Announcement plugin to include 'hello bar' for Ruby on Rails. Based on paul_revere.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

HelloBar

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:

gem 'hello_bar'

Execute:

$ bundle

Run the generator to create the migration and routes:

rails generate hello_bar

Add the default announcement CSS to app/assets/stylesheets/application.css:

//= require announcements

Add the helper to app/views/layouts/application.html.erb:

<%= hello_bar %>

Run the migration:

rake db:migrate

Usage

HelloBar provides...

  • 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

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request