Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gubbara

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gubbara

  • 0.0.3
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

= Gubbara

It helps admin to announce anything including pasrsed html in a form a notice.It consists two types of announcements:

  • Session Based: Only for logged in users.(Application Layout)
  • Cookie Based: For all users visting the website.(Public Layout)

== Installation

Add this line to your application's Gemfile:

gem 'gubbara'

And then execute:

$ bundle install

Install migrations:

$ rake gubbara:install:migrations

Migrate:

$ rake db:migrate

== Usage

To use this gem you just need to mount it in your route file config/routes.rb

mount Gubbara::Engine => '/gubbara'

Place the helper method according to your requirement in any layout or any view page where you want to place your notice.

=== Session Based Announcements

For session based announcements place this helper method in the layout which is not publicly accessible.

example: place this in app/views/layouts/application.html.erb file.

<%= user_announcements %>

=== Cookie Based Announcements

For cookie based announcements place this helper method in the layout which is publicly accessible.

example: place this in app/views/layouts/public.html.erb file.

<%= public_announcements %>

== Features

=== Admin Panel

You can access Gubbara Admin Panel.

Please ensure that only admin can access this gubbara panel to do that you can use http_basic_authenticate_with or some other methods to prevent that url.

=== Configuration

You can configure background_color, font_color, font_size, text_alignment, z_index and even cross_button_color of that notice.

It also can disable the notice when notice will not be needed any more.

=== Disable

You can disable the announcement from the admin panel when you don't want your users to see that announcement anymore.

=== Html Parsing

You can even put your complete html in the text field and the output would be html parsed announcement.

=== Hide

==== Session

When a user clicks on the cross button it hides the template for that session and will not show till the session expires or disabled by admin.

==== Cookie

When a user clicks on the cross button it hides the template and user will not be able to see that annoucement again on that broswer because cookies are permanent and also the expiry date of cookies are 1 year.

== Note

There may be the situations that you want to play with the CSS of annoucements so you can play with it. Structure of it is like Notices is parent class for all the annoucements.

FAQs

Package last updated on 10 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc