Forum: Ruby on Rails Default button / submit class

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.
D9d1b31a337f46ac5e4dd56b55404f58?d=identicon&s=25 Dylan Markow (dmarkow)
on 2007-05-09 19:10
Is there a way to set a default class to all <button /> or <input
type="submit" /> elements? I know rails has a way to do this for other
fields, such as
ActionView::Helpers::InstanceTag::DEFAULT_FIELD_OPTIONS = { "class" =>
"text" }. However I haven't found anything like this for

I know I can add something like input[type="submit"] { ... } to my CSS,
but this won't work for Internet Explorer.

It just doesn't seem very DRY that I should have to add a :class =>
"button" to every single button on my site.
This topic is locked and can not be replied to.