estum / growlyflash

Growl-styled flash messages for Ruby on Rails and Bootstrap
MIT License
58 stars 34 forks source link

[Question] How to configure it? #12

Closed isaacqueiroz closed 9 years ago

isaacqueiroz commented 9 years ago

Hi! This gem is awesome!

One question... On Rails 4.1, let's say I want to change:

Growlyflash.defaults = $.extend on, Growlyflash.defaults,
  align:   'center'  # horizontal aligning (left, right or center)
  delay:   4000     # auto-dismiss timeout (0 to disable auto-dismiss)
  dismiss: yes      # allow to show close button
  spacing: 10       # spacing between alerts
  target:  'body'   # selector to target element where to place alerts
  type:    null     # bootstrap alert class by default
  class:   ['alert', 'growlyflash', 'fade']

Just as documented so I can center the notification. How/Where do I put this script?

Thanks!

isaacqueiroz commented 9 years ago

Made it placing the JS on the botton of my layout page.