root/app/helpers/flash_helper.rb

Download in other formats: Raw | Text
Revisions
Dimitrij Denissenko
Dimitrij Denissenko
Jan 24 2009 * 11:51
(over 1 year ago)

Revision b1794537d634e7833190d162a0351bc60046c8fc

Initial public import

1
2
3
4
5
6
7
8
9
10
11
12
module FlashHelper

  def render_flash_messages
    return '' unless flash[:error] || flash[:notice] || flash[:warning]

    render(:partial => 'layouts/flash_messages') + 
      javascript_tag( 
        visual_effect(:appear, 'flash_box', :duration => 0.5, :to => 0.7, :queue => {:position => :end, :scope => :folder}) + 
        visual_effect(:fade, 'flash_box', :duration => 0.5, :delay => 8, :from => 0.7, :queue => {:position => :end, :scope => :folder}))        
  end

end