Skip to content

Commit

Permalink
FIX: issue: type progress: doesn't load the image png (not exists) be…
Browse files Browse the repository at this point in the history
…cause it is a GIF file. fix #16
  • Loading branch information
linuxonrails committed Feb 22, 2012
1 parent 43bcf79 commit 1d5ec11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/gritter/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module Helpers
def add_gritter text, *args
options = args.extract_options!
options[:title] = "Notification" if options[:title].blank?
options[:image] = ::Rails.version < "3.1" ? "/images/gritter/#{options[:image]}.png" : asset_path("#{options[:image]}.png") if %w(success warning error notice progress).include?(options[:image].to_s)
options[:image] = ::Rails.version < "3.1" ? "/images/gritter/#{options[:image]}.png" : asset_path("#{options[:image]}#{options[:image] == 'progress' ? '.gif' : '.png'}") if %w(success warning error notice progress).include?(options[:image].to_s)
notification = ["jQuery(function(){"]
notification.push("jQuery.gritter.add({")
notification.push("image:'#{options[:image]}',") if options[:image].present?
Expand Down

0 comments on commit 1d5ec11

Please sign in to comment.