lunaclaire
2010-Mar-04 03:10 UTC
trying to set text_area helper class for css => getting weirdness
here''s my view code: <%= f.text_area :notes, :cols => 40, :rows => 15, :class => ''focus'' %> here''s what firefox shows is being gen''d: <textarea rows="15" name="contact[notes]" id="contact_notes" cols="40" class="focus text_area"></textarea> note that I''m ending up with a class = "focus text_area" instead of the expected "focus" It doesnt look like I''m doing anything wrong, but... am I? -- 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.
Gael Muller
2010-Mar-04 09:30 UTC
Re: trying to set text_area helper class for css => getting weirdness
On Thu, Mar 4, 2010 at 4:10 AM, lunaclaire <szagerman-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> here''s my view code: > > <%= f.text_area :notes, :cols => 40, :rows => 15, :class => ''focus'' %> > > here''s what firefox shows is being gen''d: > > <textarea rows="15" name="contact[notes]" id="contact_notes" cols="40" > class="focus text_area"></textarea> > > note that I''m ending up with a class = "focus text_area" instead of > the expected "focus" > > It doesnt look like I''m doing anything wrong, but... am I? >You are not doing anything wrong, and there is nothing wrong with the piece of code generated by rails. This is only saying that your element as two classes: ''text_area'', which is used by rails, and ''focus''. -- Gael Muller -- 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.
lunaclaire
2010-Mar-04 17:10 UTC
Re: trying to set text_area helper class for css => getting weirdness
Ahh... good pt. The thing is, I''m using this with some new jQuery stuff I''m doing where that code looks for input elements with a class == ''focus''... Guess I''ll have to change that to look for elements *containing* that class. But, I''m curious why I dont get the dame thing for text_fields... there the class just comes out as ''focus''. Any ideas about that? On Mar 4, 1:30 am, Gael Muller <hatake.cont...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Thu, Mar 4, 2010 at 4:10 AM, lunaclaire <szager...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > here''s my view code: > > > <%= f.text_area :notes, :cols => 40, :rows => 15, :class => ''focus'' %> > > > here''s what firefox shows is being gen''d: > > > <textarea rows="15" name="contact[notes]" id="contact_notes" cols="40" > > class="focus text_area"></textarea> > > > note that I''m ending up with a class = "focus text_area" instead of > > the expected "focus" > > > It doesnt look like I''m doing anything wrong, but... am I? > > You are not doing anything wrong, and there is nothing wrong with the > piece of code generated by rails. This is only saying that your > element as two classes: ''text_area'', which is used by rails, and > ''focus''. > > -- > Gael Muller-- 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.
lunaclaire
2010-Mar-04 17:10 UTC
Re: trying to set text_area helper class for css => getting weirdness
Ahh... good pt. The thing is, I''m using this with some new jQuery stuff I''m doing where that code looks for input elements with a class == ''focus''... Guess I''ll have to change that to look for elements *containing* that class. But, I''m curious why I dont get the dame thing for text_fields... there the class just comes out as ''focus''. Any ideas about that? On Mar 4, 1:30 am, Gael Muller <hatake.cont...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Thu, Mar 4, 2010 at 4:10 AM, lunaclaire <szager...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > here''s my view code: > > > <%= f.text_area :notes, :cols => 40, :rows => 15, :class => ''focus'' %> > > > here''s what firefox shows is being gen''d: > > > <textarea rows="15" name="contact[notes]" id="contact_notes" cols="40" > > class="focus text_area"></textarea> > > > note that I''m ending up with a class = "focus text_area" instead of > > the expected "focus" > > > It doesnt look like I''m doing anything wrong, but... am I? > > You are not doing anything wrong, and there is nothing wrong with the > piece of code generated by rails. This is only saying that your > element as two classes: ''text_area'', which is used by rails, and > ''focus''. > > -- > Gael Muller-- 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.
lunaclaire
2010-Mar-04 18:06 UTC
Re: trying to set text_area helper class for css => getting weirdness
Ahh... good pt. The thing is, I''m using this with some new jQuery stuff I''m doing where that code looks for input elements with a class == ''focus''... Guess I''ll have to change that to look for elements *containing* that class. But, I''m curious why I dont get the dame thing for text_fields... there the class just comes out as ''focus''. Any ideas about that? On Mar 4, 1:30 am, Gael Muller <hatake.cont...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Thu, Mar 4, 2010 at 4:10 AM, lunaclaire <szager...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > here''s my view code: > > > <%= f.text_area :notes, :cols => 40, :rows => 15, :class => ''focus'' %> > > > here''s what firefox shows is being gen''d: > > > <textarea rows="15" name="contact[notes]" id="contact_notes" cols="40" > > class="focus text_area"></textarea> > > > note that I''m ending up with a class = "focus text_area" instead of > > the expected "focus" > > > It doesnt look like I''m doing anything wrong, but... am I? > > You are not doing anything wrong, and there is nothing wrong with the > piece of code generated by rails. This is only saying that your > element as two classes: ''text_area'', which is used by rails, and > ''focus''. > > -- > Gael Muller-- 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.