what is a sexier way of doing this <% if not params[:action]==''login'' and not params[:action]==''signup'' and not params[:action]==''feedback''%> Helen clark vs Winston Peters <%end%> cheers dion -- www.blogsaic.com search, post, blog --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
<% if not [''login'',''signup'',''feedback''].include? (params[:action])''%> ... Dion Hewson wrote:> what is a sexier way of doing this > > <% if not params[:action]==''login'' and not params[:action]==''signup'' and not > params[:action]==''feedback''%> > > Helen clark vs Winston Peters > > <%end%> > > > cheers > > dion > -- > > www.blogsaic.com > search, post, blog > > ------=_Part_4136_19387732.1158841223075 > Content-Type: text/html; charset=ISO-8859-1 > X-Google-AttachSize: 348 > > what is a sexier way of doing this<br><br><% if not params[:action]==''login'' and not params[:action]==''signup'' and not params[:action]==''feedback''%><br clear="all"><br>Helen clark vs Winston Peters<br><br><%end%> > <br><br><br>cheers<br><br>dion<br>-- <br><br><a href="http://www.blogsaic.com">www.blogsaic.com</a><br>search, post, blog > > ------=_Part_4136_19387732.1158841223075----~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
> <% if not params[:action]==''login'' and not params[:action]==''signup'' and not > params[:action]==''feedback''%>''loginsignupfeedback''.match(''login'') => """"true"""" ''loginsignupfeedback''.match(''register'') => nil --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
nice and easy, cheers joe.b On 9/21/06, joeb <joe.blauer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > <% if not [''login'',''signup'',''feedback''].include? (params[:action])''%> > ... > > Dion Hewson wrote: > > what is a sexier way of doing this > > > > <% if not params[:action]==''login'' and not params[:action]==''signup'' and > not > > params[:action]==''feedback''%> > > > > Helen clark vs Winston Peters > > > > <%end%> > > > > > > cheers > > > > dion > > -- > > > > www.blogsaic.com > > search, post, blog > > > > ------=_Part_4136_19387732.1158841223075 > > Content-Type: text/html; charset=ISO-8859-1 > > X-Google-AttachSize: 348 > > > > what is a sexier way of doing this<br><br><% if not > params[:action]==''login'' and not params[:action]==''signup'' and not > params[:action]==''feedback''%><br clear="all"><br>Helen clark vs Winston > Peters<br><br><%end%> > > <br><br><br>cheers<br><br>dion<br>-- <br><br><a href=" > http://www.blogsaic.com">www.blogsaic.com</a><br>search, post, blog > > > > ------=_Part_4136_19387732.1158841223075-- > > > > >-- www.blogsaic.com search, post, blog --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
joeb <joe.blauer@...> writes:> > <% if not [''login'',''signup'',''feedback''].include? (params[:action])''%> >If you''re feeling adventurous, <% unless [''login'',''signup'',''feedback''].include? (params[:action])'' %> --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
<% if not params[:action] =~ /login|signup|feedback/ %> Helen Clark vs Winston Peters <% end -----Original Message----- From: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails-talk@googlegroups.com]On Behalf Of Dion Hewson Sent: Thursday, September 21, 2006 7:20 AM To: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Subject: [Rails] my ruby is ugly what is a sexier way of doing this <% if not params[:action]==''login'' and not params[:action]==''signup'' and not params[:action]==''feedback''%> Helen clark vs Winston Peters <%end%> cheers dion -- www.blogsaic.com search, post, blog --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@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 -~----------~----~----~----~------~----~------~--~---
> > <% if not params[:action]==''login'' and not > params[:action]==''signup'' > > and not params[:action]==''feedback''%> > > ''loginsignupfeedback''.match(''login'') => """"true"""" > > ''loginsignupfeedback''.match(''register'') => nilThis is not a good idea. The following are also true: ''loginsignupfeedback''.match(''log'') ''loginsignupfeedback''.match(''feed'') ''loginsignupfeedback''.match(''insign'') --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@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 -~----------~----~----~----~------~----~------~--~---
It''s too Perlish =) All the Best! Sergey. Nathan Leach wrote:> <% if not params[:action] =~ /login|signup|feedback/ %> > Helen Clark vs Winston Peters > <% end > > -----Original Message----- > *From:* rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org]*On Behalf Of *Dion Hewson > *Sent:* Thursday, September 21, 2006 7:20 AM > *To:* rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > *Subject:* [Rails] my ruby is ugly > > what is a sexier way of doing this > > <% if not params[:action]==''login'' and not > params[:action]==''signup'' and not params[:action]==''feedback''%> > > Helen clark vs Winston Peters > > <%end%> > > > cheers > > dion > -- > > www.blogsaic.com <http://www.blogsaic.com> > search, post, blog > > >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Thomas, Mark - BLS CTR wrote:>>> <% if not params[:action]==''login'' and not >>> >> params[:action]==''signup'' >> >>> and not params[:action]==''feedback''%> >>> >> ''loginsignupfeedback''.match(''login'') => """"true"""" >> >> ''loginsignupfeedback''.match(''register'') => nil >> > > This is not a good idea. The following are also true: > > ''loginsignupfeedback''.match(''log'') > ''loginsignupfeedback''.match(''feed'') > ''loginsignupfeedback''.match(''insign'') >Then do it this way: ''login,signup,feedback''.match(''login'') => """"true"""" :) All the Best! Sergey. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
> <% if not [''login'',''signup'',''feedback''].include? (params[:action])''%>... Nice. Here''s something a bit different: <% case params[:action] when ''login'',''signup'',''feedback'' %> <% else %> ... <% end %> --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@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 -~----------~----~----~----~------~----~------~--~---
On Sep 21, 2006, at 5:20 AM, Dion Hewson wrote:> what is a sexier way of doing this > > <% if not params[:action]==''login'' and not params[:action] > ==''signup'' and not params[:action]==''feedback''%>You''ve received good advice on Ruby, but I think you should include that advice with a Rails helper... <% if normal_request %> and in your helper... def normal_request # logic of your choice goes here end --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Tom, Good advice! I also giggling a little about the fact that a simple request to compare a string to three values has generated this many replies, all with different ways to do it. That''s why I love Ruby, Rails, and this list! Nathan -----Original Message----- From: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org]On Behalf Of Tom Mornini Sent: Thursday, September 21, 2006 9:40 AM To: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Subject: [Rails] Re: my ruby is ugly On Sep 21, 2006, at 5:20 AM, Dion Hewson wrote:> what is a sexier way of doing this > > <% if not params[:action]==''login'' and not params[:action] > ==''signup'' and not params[:action]==''feedback''%>You''ve received good advice on Ruby, but I think you should include that advice with a Rails helper... <% if normal_request %> and in your helper... def normal_request # logic of your choice goes here end --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@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 -~----------~----~----~----~------~----~------~--~---
Whats funny is that no one made any comments on Helen clark vs Winston Peters On 9/22/06, Nathan Leach <nathan.leach-8O96a5ImwvDQT0dZR+AlfA@public.gmane.org> wrote:> > > Tom, > > Good advice! I also giggling a little about the fact that a simple > request to compare a string to three values has generated this many replies, > all with different ways to do it. That''s why I love Ruby, Rails, and this > list! > > Nathan > > -----Original Message----- > From: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org]On Behalf Of Tom Mornini > Sent: Thursday, September 21, 2006 9:40 AM > To: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > Subject: [Rails] Re: my ruby is ugly > > > > On Sep 21, 2006, at 5:20 AM, Dion Hewson wrote: > > > what is a sexier way of doing this > > > > <% if not params[:action]==''login'' and not params[:action] > > ==''signup'' and not params[:action]==''feedback''%> > > You''ve received good advice on Ruby, but I think you should include > that advice with a Rails helper... > > <% if normal_request %> > > and in your helper... > > def normal_request > # logic of your choice goes here > end > > > > > > > >-- www.blogsaic.com search, post, blog --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
> >> ''loginsignupfeedback''.match(''login'') => """"true"""" > >> > >> ''loginsignupfeedback''.match(''register'') => nil > >> > > > > This is not a good idea. The following are also true: > > > > ''loginsignupfeedback''.match(''log'') > > ''loginsignupfeedback''.match(''feed'') > > ''loginsignupfeedback''.match(''insign'') > > > Then do it this way: > > ''login,signup,feedback''.match(''login'') => """"true""""That fixes only 1 out of the 3 failing cases... --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@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 -~----------~----~----~----~------~----~------~--~---
Thomas, Mark - BLS CTR wrote:>>>> ''loginsignupfeedback''.match(''login'') => """"true"""" >>>> >>>> ''loginsignupfeedback''.match(''register'') => nil >>>> >>>> >>> This is not a good idea. The following are also true: >>> >>> ''loginsignupfeedback''.match(''log'') >>> ''loginsignupfeedback''.match(''feed'') >>> ''loginsignupfeedback''.match(''insign'') >>> >>> >> Then do it this way: >> >> ''login,signup,feedback''.match(''login'') => """"true"""" >> > > That fixes only 1 out of the 3 failing cases... >I agree. That was fast morning partially correct answer that I realized after I sent that email. PS: I need more coffee =) All the Best! Sergey. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---