RobinBrouwer/gritter

Setting time value

Harxy opened this issue · 1 comments

Harxy commented

Hey, Sorry to open two issues in one day, particularly as it is most likely user error, but there is something quite odd going on.

I'm using gflash and this works fine:

    if @note.save
      gflash :success => "success"
      redirect_to '/notes'
    end

The only problem with that is the time, it's about 5 seconds which is too long.

This, however, does not work:

gflash :success => { :value => "success", :time => 2000 }

just nothing happens whatsoever. Whenever I try to pass values in to the gflash to override the defaults, it just stops displaying the gritter, without an error message, and I have no idea how to debug it either.

Any help would be greatly appreciated :)

After removing :time I get an error 'undefined method `gsub' for 3000:Fixnum'
https://github.com/RobinBrouwer/gritter/issues/66