Forum: Ruby on Rails why can't I add a :class to text_field?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ffd881829651935d986c52d12279befb?d=identicon&s=25 Zhenning Guan (rubyernewbie)
on 2009-06-08 07:57
<%= text_field_tag 'login' ,nil, {:class => 'line'} %>
 the old way work.

<%= f.text_field :login, :class => 'line' %>
 but why this doesn't.
29ebf90af6107d2eb39b587c7972639c?d=identicon&s=25 Mukund (Guest)
on 2009-06-08 09:36
(Received via mailing list)
What is 'f' ?  form_tag or field_tag for which object?

On Jun 8, 10:57 am, Zhenning Guan <>
This topic is locked and can not be replied to.