Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for devise #34

Closed
saiqulhaq opened this issue Jul 6, 2013 · 0 comments
Closed

Support for devise #34

saiqulhaq opened this issue Jul 6, 2013 · 0 comments

Comments

@saiqulhaq
Copy link

Hello
First of all, this is not a bug
but it might be annoying if someone uses this gem with Devise gem
I mean is, in the Devise gem, there timeoutable module that store its data in a flash

check this heartcombo/devise#1777

so it will show

   class = " .... alert_timedout"> true </ div>

so what if the method notice_message be like this

def notice_message
  flash_messages = []
  filtered_flash = flash.delete(:timedout)
  filtered_flash.each do |type, message|        
    type = :success if type == :notice
    text = content_tag(:div, link_to("x", "#", :class => "close", "data-dismiss" => "alert") + message, :class => "alert fade in alert-#{type}")
    flash_messages << text if message
  end
  flash_messages.join("\n").html_safe
end

or maybe you could make it more customizable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant