Hi everyone! I have installed Devise under the following settings: * Rails 3.0.0. * Ruby version: 1.9.2p0 (2010-08-18 revison 29036). * Ubuntu 10.04. * Devise version: 1.1.2 It appears the alert messages are not being displayed. The notices are being displayed, no problem with those. Has anyone noticed this in the meantime perhaps? Thank you! -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
are you looping the flash messages? flash.each do |name, msg| ... -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Yes. On Sep 21, 7:37 pm, radhames brito <rbri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> are you looping the flash messages? > > flash.each do |name, msg| > ...-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
check your css to see if you are using flash_warning instead of flash_alert for the styling -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I don''t have any styles yet, just pure markup :) -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
can you paste the code where you loop the flash in the view? are you able to flash[:alert] by other means? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Tue, Sep 21, 2010 at 7:14 AM, José Mota <josemota.net-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi everyone! I have installed Devise under the following settings: > * Rails 3.0.0. > * Ruby version: 1.9.2p0 (2010-08-18 revison 29036). > * Ubuntu 10.04. > * Devise version: 1.1.2 > > It appears the alert messages are not being displayed. The notices are > being displayed, no problem with those. > Has anyone noticed this in the meantime perhaps?I might be having a similar issue, if I try to sign in (using Devise), I do not get a message of anything happening if the login is incorrect. (I assume some kind of error message should show up?) If I''m on the login screen however and I do something wrong I do get proper error notices showing up. -- Rick R -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
@Rick: What do you mean by "if I try to sign in (using Devise)" and "If I''m on the login screen however"? Are trying to sign in a Model from another controller and you redirect back if login was not successful? Everything works fine for me. One more thing, make sure you set the flash messages explicitly if you are overriding default Devise controllers'' actions. On Sep 22, 11:25 am, Rick R <ric...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Tue, Sep 21, 2010 at 7:14 AM, José Mota <josemota....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Hi everyone! I have installed Devise under the following settings: > > * Rails 3.0.0. > > * Ruby version: 1.9.2p0 (2010-08-18 revison 29036). > > * Ubuntu 10.04. > > * Devise version: 1.1.2 > > > It appears the alert messages are not being displayed. The notices are > > being displayed, no problem with those. > > Has anyone noticed this in the meantime perhaps? > > I might be having a similar issue, if I try to sign in (using Devise), > I do not get a message of anything happening if the login is > incorrect. (I assume some kind of error message should show up?) > > If I''m on the login screen however and I do something wrong I do get > proper error notices showing up. > > -- > Rick R-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Tue, Sep 21, 2010 at 11:17 PM, tundrax <sherzod-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> @Rick: What do you mean by "if I try to sign in (using Devise)" and > "If I''m on the login screen however"?Sorry I screwed up the terminology a bit. I''m using :confirmable and there is a screen where you can "sign up" which sends out a registration email. This screen produces errors as expected. For example if I use an existing email, I''ll get proper errors: http://dl.dropbox.com/u/86998/signup.png However the by "sign in" screen I mean the main login screen. Here is a screen shot of it - note here I entered an invalid login and I''m getting no message: http://dl.dropbox.com/u/86998/signin.png> Are trying to sign in a Model from another controller and you redirect > back if login was not successful?I don''t think I''m doing anything out of the ordinary (but I''m a newb so possibly I am?) I''m using the standard views created by Devise (I generated them and did add one field "name")> One more thing, make sure you set the flash messages explicitly if you > are overriding default Devise controllers'' actions.I haven''t overridden any of Devices controllers. Thanks for trying to help. I''m sure it''ll be something stupid.> > On Sep 22, 11:25 am, Rick R <ric...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> On Tue, Sep 21, 2010 at 7:14 AM, José Mota <josemota....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> > Hi everyone! I have installed Devise under the following settings: >> > * Rails 3.0.0. >> > * Ruby version: 1.9.2p0 (2010-08-18 revison 29036). >> > * Ubuntu 10.04. >> > * Devise version: 1.1.2 >> >> > It appears the alert messages are not being displayed. The notices are >> > being displayed, no problem with those. >> > Has anyone noticed this in the meantime perhaps? >> >> I might be having a similar issue, if I try to sign in (using Devise), >> I do not get a message of anything happening if the login is >> incorrect. (I assume some kind of error message should show up?) >> >> If I''m on the login screen however and I do something wrong I do get >> proper error notices showing up. >> >> -- >> Rick R > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- Rick R -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
@Rick: Erros on "sign up" page are form errors, generated by "devise_error_messages!" helper. However, the errors of the "login" action are set via "flash[:alert]". So you probably are missing flash[:alert] print out line in your layout file. Refer to the documentations (README) the last paragraph in "Configuring controllers" section. On Sep 22, 12:33 pm, Rick R <ric...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Tue, Sep 21, 2010 at 11:17 PM, tundrax <sher...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > @Rick: What do you mean by "if I try to sign in (using Devise)" and > > "If I''m on the login screen however"? > > Sorry I screwed up the terminology a bit. I''m using :confirmable and > there is a screen where you can "sign up" which sends out a > registration email. This screen produces errors as expected. For > example if I use an existing email, I''ll get proper errors: > > http://dl.dropbox.com/u/86998/signup.png > > However the by "sign in" screen I mean the main login screen. Here is > a screen shot of it - note here I entered an invalid login and I''m > getting no message: > > http://dl.dropbox.com/u/86998/signin.png > > > Are trying to sign in a Model from another controller and you redirect > > back if login was not successful? > > I don''t think I''m doing anything out of the ordinary (but I''m a newb > so possibly I am?) I''m using the standard views created by Devise (I > generated them and did add one field "name") > > > One more thing, make sure you set the flash messages explicitly if you > > are overriding default Devise controllers'' actions. > > I haven''t overridden any of Devices controllers. > > Thanks for trying to help. I''m sure it''ll be something stupid. > > > > > > > > > On Sep 22, 11:25 am, Rick R <ric...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> On Tue, Sep 21, 2010 at 7:14 AM, José Mota <josemota....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> > Hi everyone! I have installed Devise under the following settings: > >> > * Rails 3.0.0. > >> > * Ruby version: 1.9.2p0 (2010-08-18 revison 29036). > >> > * Ubuntu 10.04. > >> > * Devise version: 1.1.2 > > >> > It appears the alert messages are not being displayed. The notices are > >> > being displayed, no problem with those. > >> > Has anyone noticed this in the meantime perhaps? > > >> I might be having a similar issue, if I try to sign in (using Devise), > >> I do not get a message of anything happening if the login is > >> incorrect. (I assume some kind of error message should show up?) > > >> If I''m on the login screen however and I do something wrong I do get > >> proper error notices showing up. > > >> -- > >> Rick R > > > -- > > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en. > > -- > Rick R-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
You are getting validation errors not devise messages, validation errors come from rails. On Tue, Sep 21, 2010 at 11:33 PM, Rick R <rickcr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Tue, Sep 21, 2010 at 11:17 PM, tundrax <sherzod-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > @Rick: What do you mean by "if I try to sign in (using Devise)" and > > "If I''m on the login screen however"? > > Sorry I screwed up the terminology a bit. I''m using :confirmable and > there is a screen where you can "sign up" which sends out a > registration email. This screen produces errors as expected. For > example if I use an existing email, I''ll get proper errors: > > http://dl.dropbox.com/u/86998/signup.png > > However the by "sign in" screen I mean the main login screen. Here is > a screen shot of it - note here I entered an invalid login and I''m > getting no message: > > http://dl.dropbox.com/u/86998/signin.png > > > Are trying to sign in a Model from another controller and you redirect > > back if login was not successful? > > I don''t think I''m doing anything out of the ordinary (but I''m a newb > so possibly I am?) I''m using the standard views created by Devise (I > generated them and did add one field "name") > > > One more thing, make sure you set the flash messages explicitly if you > > are overriding default Devise controllers'' actions. > > I haven''t overridden any of Devices controllers. > > Thanks for trying to help. I''m sure it''ll be something stupid. > > > > > On Sep 22, 11:25 am, Rick R <ric...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> On Tue, Sep 21, 2010 at 7:14 AM, José Mota <josemota....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > >> > Hi everyone! I have installed Devise under the following settings: > >> > * Rails 3.0.0. > >> > * Ruby version: 1.9.2p0 (2010-08-18 revison 29036). > >> > * Ubuntu 10.04. > >> > * Devise version: 1.1.2 > >> > >> > It appears the alert messages are not being displayed. The notices are > >> > being displayed, no problem with those. > >> > Has anyone noticed this in the meantime perhaps? > >> > >> I might be having a similar issue, if I try to sign in (using Devise), > >> I do not get a message of anything happening if the login is > >> incorrect. (I assume some kind of error message should show up?) > >> > >> If I''m on the login screen however and I do something wrong I do get > >> proper error notices showing up. > >> > >> -- > >> Rick R > > > > -- > > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > > > > > > > -- > Rick R > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Tried flash[:alert] on the view. Still no luck. Regarding Rick''s situation, I am not using customizations yet, it''s Devise''s still default use. Bad login message shows up. Errors on signup show up too. On 21 Set, 22:52, radhames brito <rbri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> can you paste the code where you loop the flash in the view? > > are you able to flash[:alert] by other means?-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
no he meant you need to add the corresponding div , you see rails 2.x scaffold adds <div flash_notice></div> in the layout, but you need one div like that for each type of message other wise it wont appear. add this <% flash.each do |name, msg| %> <%= content_tag :div, msg, :id => "flash_#{name}" %> <% end %> it will loop the flash to see if there is any kind of message and create a corresponding div -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Wed, Sep 22, 2010 at 9:35 AM, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> add this > > <% flash.each do |name, msg| %> > <%= content_tag :div, msg, :id => "flash_#{name}" %> > <% end %> > it will loop the flash to see if there is any kind of message and create a > corresponding divThanks so much! That solved it! and tundrax''s point to look at configuring controllers helped where it says: "Remember that Devise uses flash messages to let users know if sign in was successful or failed. Devise expects your application to call "flash[:notice]" and "flash[:alert]" as appropriate. " (Sorry I hadn''t looked there since didn''t think it was related to that section.) In my application layout I had: <%= flash[:notice] %> but I did not have <%= flash[:alert] %> adding radhames'' loop, or the flash alert, solves it. I take it the loop is better approach since it will work for any type of flash message - notice or alert? -- Rick R -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
> > I take it the loop is better approach since it will work for any type > of flash message - notice or alert? >yes the flash accepts anything you can do this in your controller flash[:taco]= "i want taco" and a corresponding tace div will be there too with its message -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
It''s still not working for me :( My HAML code: http://gist.github.com/592250 flash[:alert] is there. It does show the errors on a bad login, but it doesn''t show actions when: * Trying to login when already logged in; * Trying to logout when not logged in at all. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Wed, Sep 22, 2010 at 2:48 PM, José Mota <josemota.net-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> It''s still not working for me :( My HAML code: http://gist.github.com/592250 > > flash[:alert] is there. It does show the errors on a bad login, but it > doesn''t show actions when: > * Trying to login when already logged in; > * Trying to logout when not logged in at all.Are you sure it''s supposed to? Are you using the provided menu items that Devise gives you: <%= render ''devise/menu/registration_items'' %> <%= render ''devise/menu/login_items'' %> You can generate those views if you want and look at them and you''ll see you shouldn''t have the options you describe available under those conditions. -- Rick R -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
surely devise has no errors for that, you can check the devise code and see if it does -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I talked to José Valim himself. So it seems Devise won''t tell if "you are already logged in" or "you are not logged in". Thanks for the help guys! On Sep 22, 9:09 pm, radhames brito <rbri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> surely devise has no errors for that, you can check the devise code and see > if it does-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.