being sent to the Trace-Window? ActiveRecord::RecordInvalid in UsersController#create Validation failed: Login can''t be blank, Login is too short (minimum is 3 characters), ..... ..... ..... this is what im getting instaed of my layout which is supposed to flash the errors & notices. is there somethign misconfigured? thx -- 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.
you have to post some of your layout code , but it seems like there is a problem with your login form and is getting submitted when you try to access the page, but to be sure we have to see some of the lay out code and we have to know it the login form can be triggered by JS -- 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.
user-controller: flash[:error] =@user.errors flash[:notice] = "Error SignUp - pls try again - Support has been contacted!" application.html <body class="bodybckgrnd"> <% if flash[:notice] -%> <%= flash[:notice]%> <%= flash[:error]%> <% end -%> #i reduced it to the minimum. the user signup form is just a regular form.... what else can i provide? thx for ur help! On Mon, Oct 25, 2010 at 10:59 AM, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> you have to post some of your layout code , but it seems like there is a > problem with your login form and is getting submitted when you try to > access the page, but to be sure we have to see some of the lay out code and > we have to know it the login form can be triggered by JS > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Mon, Oct 25, 2010 at 11:08 AM, tom <tomabroad-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> user-controller: > > flash[:error] =@user.errors > flash[:notice] = "Error SignUp - pls try again - Support has been > contacted!" > > > application.html > <body class="bodybckgrnd"> > <% if flash[:notice] -%> > <%= flash[:notice]%> > <%= flash[:error]%> > <% end -%> > > first change this mess to this<% message.each do |name, msg| %> <% = content_tag :div, msg, :id => "flash_#{name}" %>> #i reduced it to the minimum. the user signup form is just a regular > form.... > > what else can i provide? > > thx for ur help! > > > now look at thisflash[:error] =@user.errors>this is what you are seen, so what i want to know is, 1) do you see this when you try to login or just by trying to access the root page? 2) what are you using for authentication? 3) can you post the login form? -- 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.
0) ActionView::TemplateError (undefined local variable or method `message'' for #<ActionView::Base:0xb6080e74>) on line #32 of app/views/layouts/application.html.erb: 29: 30: 31: <body class="bodybckgrnd"> 32: <% message.each do |name, msg| %> 33: <%= content_tag :div, msg, :id => "flash_#{name}" %> 34: <% end %> 1)the problem occurs after hitting the submit button, meaning after the validation failes 2)old rails app > restful_authentication 3)login form is more or less basic functionailty, but quite a few fields. ill stripp it down later. thx On Mon, Oct 25, 2010 at 11:17 AM, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On Mon, Oct 25, 2010 at 11:08 AM, tom <tomabroad-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> user-controller: >> >> flash[:error] =@user.errors >> flash[:notice] = "Error SignUp - pls try again - Support has been >> contacted!" >> >> >> application.html >> <body class="bodybckgrnd"> >> <% if flash[:notice] -%> >> <%= flash[:notice]%> >> <%= flash[:error]%> >> <% end -%> >> >> first change this mess to this > > <% message.each do |name, msg| %> > <% = content_tag :div, msg, :id => "flash_#{name}" %> > > >> #i reduced it to the minimum. the user signup form is just a regular >> form.... >> >> what else can i provide? >> >> thx for ur help! >> >> >> now look at this > > flash[:error] =@user.errors >> > > this is what you are seen, so what i want to know is, > > 1) do you see this when you try to login or just by trying to access the > root page? > 2) what are you using for authentication? > 3) can you post the login form? > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
> 31: <body class="bodybckgrnd"> > 32: <% message.each do |name, msg| %> > 33: <%= content_tag :div, msg, :id => "flash_#{name}" %> > 34: <% end %> >sorry i strackted that from a partial it should look like this <% flash.each do |name, msg| %> <%= content_tag :div, msg, :id => "flash_#{name}" %> -- 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.
just minimized everything down to: <% form_for (@user) do |f| -%> <%= f.error_messages %> <p><label for="login">Login</label><br/> <%= f.text_field :login, :class=>''input_signup'' %></p> <p><label for="email">Email</label><br/> <%= f.text_field :email, :class=>''input_signup'' %></p> <p><label for="password">Password</label><br/> <%= f.password_field :password, :class=>''input_signup'' %></p> <p><label for="password_confirmation">Confirm Password</label><br/> <%= f.password_field :password_confirmation, :class=>''input_signup'' %></p> <p><%= submit_tag ''Sign up'' %></p> <% end -%> def create @user = User.new(params[:user]) @user.save! if @user.errors.empty? flash[:notice] = "Thanks for signing up! Please check your email to activate your account." else p @user.errors flash[:error] =@user.errors flash[:notice] = "Error SignUp - pls try again - Support has been contacted!" redirect_to signup_url end end result is still: ActiveRecord::RecordInvalid in UsersController#create Validation failed: Password is too short (minimum is 4 characters) validation are on login, email & password thx On Mon, Oct 25, 2010 at 11:31 AM, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > 31: <body class="bodybckgrnd"> >> 32: <% message.each do |name, msg| %> >> 33: <%= content_tag :div, msg, :id => "flash_#{name}" %> >> 34: <% end %> >> > > > sorry i strackted that from a partial it should look like this > > > <% flash.each do |name, msg| %> > > <%= content_tag :div, msg, :id => "flash_#{name}" %> > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
remove the ! from the save , when you add a shebang to a rails method you force and exception, so instead of just outputting the age with is flash message you are making rails raise and exception change this @user.save! to this @user.save -- 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 Mon, Oct 25, 2010 at 11:41 AM, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> remove the ! from the save , when you add a shebang to a rails method you > force an exception, so instead of just outputting the age with is flash > message you are making rails raise and exception > > > > change this > > @user.save! > > to this > > @user.save >fixed a typo, i meant "force an exception" -- 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 Mon, Oct 25, 2010 at 11:42 AM, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On Mon, Oct 25, 2010 at 11:41 AM, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: > >> remove the ! from the save , when you add a shebang to a rails method you >> force an exception, so instead of just outputting the age with is flash >> message you are making rails raise and exception >> >>another typo on "page" i wrote age -- 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.
argh - u got very good eyes. oh man - i was so blind....and not thinking cleary. thank u soo much!!!! On Mon, Oct 25, 2010 at 11:42 AM, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On Mon, Oct 25, 2010 at 11:41 AM, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: > >> remove the ! from the save , when you add a shebang to a rails method you >> force an exception, so instead of just outputting the age with is flash >> message you are making rails raise and exception >> >> >> >> >> change this >> >> @user.save! >> >> to this >> >> @user.save >> > > > fixed a typo, i meant "force an exception" > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
> > flash[:error] =@user.errorsI think this will cause an error since you are passing a collection to a hash that takes a string, let the form helper handle this and dont use many flashes with the loop or you will only see the last flash set -- 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 think u r right. i got rid of the @user.errors, but im getting nothing back right now.. let me check. On Mon, Oct 25, 2010 at 11:56 AM, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> flash[:error] =@user.errors > > > I think this will cause an error since you are passing a collection to a > hash that takes a string, let the form helper handle this and dont use many > flashes with the loop or you will only see the last flash set > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
now i have this: 1) @user.save if @user.errors.empty? flash[:notice] = "Thanks for signing up! Please check your email to activate your account." else redirect_to signup_url end 2) validation via model are al set 3) <hr> <% flash.each do |key, msg| %> <%= content_tag :div, msg, :class => "flash", :id => key %> <% content_tag :script, :type => "text/javascript" do %> $(''<%= key %>'').style.display = ''none''; new Effect.Appear(''<%= key %>'', {duration: 3}); <% end %> <% content_tag :script, :type => "text/javascript" do %> setTimeout("new Effect.Fade(''<%= key %>'');", 10000); <% end %> <% end %> <hr> <%= yield :layout %> but the only thing i see is this: ''Input literally, the string "''Input" is being displayed between the hr tags... im confused On Mon, Oct 25, 2010 at 11:56 AM, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> flash[:error] =@user.errors > > > I think this will cause an error since you are passing a collection to a > hash that takes a string, let the form helper handle this and dont use many > flashes with the loop or you will only see the last flash set > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
try this please <hr>> <% flash.each do |key, msg| %> > <%= content_tag :div, msg, :class => "flash", :id => key %><% content_tag :script, :type => "text/javascript" do %>> $(''<%= key %>'').style.display > ''none''; <=== this makes no sense the > selector never sees anything with <% %> since this never > new Effect.Appear(''<%= key %>'', {duration: > 3}); gets to the browser also the content > tag generates this flash_error, flash_notice, etc > <% end %> > > <% content_tag :script, :type => "text/javascript" do %> > setTimeout("new Effect.Fade(''<%= key %>'');", 10000); <==> again try to select something with <% %> > <% end %> > <% end %> > </hr> > <%= yield :layout %> > > > but the only thing i see is this: > > ''Input > > > literally, the string "''Input" is being displayed between the hr tags... > im confused > >-- 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 Mon, Oct 25, 2010 at 12:19 PM, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> try this please > > <hr> >> <% flash.each do |key, msg| %> >> <%= content_tag :div, msg, :class => "flash", :id => key %> > > <% content_tag :script, :type => "text/javascript" do %> >> $(''<%= key %>'').style.display >> ''none''; <=== this makes no sense the >> selector never sees anything with <% %> since this never >> new Effect.Appear(''<%= key %>'', {duration: >> 3}); gets to the browser also the content >> tag generates this flash_error, flash_notice, etc >> >> <% end %> >> >> <% content_tag :script, :type => "text/javascript" do %> >> setTimeout("new Effect.Fade(''<%= key %>'');", 10000); <==>> again try to select something with <% %> >> >> <% end %> >> <% end %> >> </hr> >> <%= yield :layout %> >> >for some reason i forgot this is ERB :P so this $(''<%= key %>'') does makes sense, but still the output is not what you expect since you will be getting flash_error, flash_notice and such and not just error and notice which is the key -- 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.
ok, i''ve placed ur snippet in: <hr> <% flash.each do |name, msg| %> <%= content_tag :div, msg, :id => "flash_#{name}" %> <% end -%> <hr> <%= yield :layout %>> same behaviour....On Mon, Oct 25, 2010 at 12:19 PM, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> try this please > > <hr> >> <% flash.each do |key, msg| %> >> <%= content_tag :div, msg, :class => "flash", :id => key %> > > <% content_tag :script, :type => "text/javascript" do %> >> $(''<%= key %>'').style.display >> ''none''; <=== this makes no sense the >> selector never sees anything with <% %> since this never >> new Effect.Appear(''<%= key %>'', {duration: >> 3}); gets to the browser also the content >> tag generates this flash_error, flash_notice, etc >> >> <% end %> >> >> <% content_tag :script, :type => "text/javascript" do %> >> setTimeout("new Effect.Fade(''<%= key %>'');", 10000); <==>> again try to select something with <% %> >> >> <% end %> >> <% end %> >> </hr> >> <%= yield :layout %> >> >> >> but the only thing i see is this: >> >> ''Input >> >> >> literally, the string "''Input" is being displayed between the hr tags... >> im confused >> >> > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Mon, Oct 25, 2010 at 12:21 PM, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On Mon, Oct 25, 2010 at 12:19 PM, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: > >> try this please >> >> <hr> >>> <% flash.each do |key, msg| %> >>> <%= content_tag :div, msg, :class => "flash", :id => key %> >> >> <% content_tag :script, :type => "text/javascript" do %> >>> $(''<%= key %>'').style.display >>> ''none''; <=== this makes no sense the >>> selector never sees anything with <% %> since this never >>> new Effect.Appear(''<%= key %>'', {duration: >>> 3}); gets to the browser also the content >>> tag generates this flash_error, flash_notice, etc >>> >>> <% end %> >>> >>> <% content_tag :script, :type => "text/javascript" do %> >>> setTimeout("new Effect.Fade(''<%= key %>'');", 10000); <==>>> again try to select something with <% %> >>> >>> <% end %> >>> <% end %> >>> </hr> >>> <%= yield :layout %> >>> >> > > for some reason i forgot this is ERB :P so this $(''<%= key %>'') does makes > sense, but still the output is not what you expect since you will be getting > flash_error, flash_notice and such and not just error and notice which is > the key >thats ok, i would b happy to see anything ;-)> -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Mon, Oct 25, 2010 at 12:23 PM, tom <tomabroad-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> ok, i''ve placed ur snippet in: > > <hr> > <% flash.each do |name, msg| %> > <%= content_tag :div, msg, :id => "flash_#{name}" %> > <% end -%> > <hr> > <%= yield :layout %> >:/ i didnt notice when you changed the original code.... you see this "input" when validation fails or always? -- 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 test only with wrong data entered On Mon, Oct 25, 2010 at 12:31 PM, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On Mon, Oct 25, 2010 at 12:23 PM, tom <tomabroad-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> ok, i''ve placed ur snippet in: >> >> <hr> >> <% flash.each do |name, msg| %> >> <%= content_tag :div, msg, :id => "flash_#{name}" %> >> <% end -%> >> <hr> >> <%= yield :layout %> >> > > > :/ i didnt notice when you changed the original code.... > > > you see this "input" when validation fails or always? > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
> > @user.save >> if @user.errors.empty? >> flash[:notice] = "Thanks for signing up! Please check your email to >> activate your account." >> else >> redirect_to signup_url >> end >> >if the flash is not set then you should not see anything, try setting something -- 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.
thats why i am violating the validation, so to speak. but somethign is strange. im already domparing a new app with that code, but cant find the hood where its gets messy... thx On Mon, Oct 25, 2010 at 12:54 PM, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> @user.save >>> if @user.errors.empty? >>> flash[:notice] = "Thanks for signing up! Please check your email to >>> activate your account." >>> else >>> redirect_to signup_url >>> end >>> >> > > if the flash is not set then you should not see anything, try setting > something > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
ok, all good now: flash[:error] = @user.errors.full_messages.collect { |msg| msg + "<br/>" } just wondering why i do need to do this now since it worked before....maybe i screwed somethign up... thx again for ur time! On Mon, Oct 25, 2010 at 1:00 PM, tom <tomabroad-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> thats why i am violating the validation, so to speak. but somethign is > strange. im already domparing a new app with that code, but cant find the > hood where its gets messy... > thx > > > > On Mon, Oct 25, 2010 at 12:54 PM, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: > >> @user.save >>>> if @user.errors.empty? >>>> flash[:notice] = "Thanks for signing up! Please check your email >>>> to activate your account." >>>> else >>>> redirect_to signup_url >>>> end >>>> >>> >> >> if the flash is not set then you should not see anything, try setting >> something >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.