need_label¶ ↑
Need_label outputs a class attribute to the indispensable input item of rails. An indispensable input can be expressed by combining with css.
How to use¶ ↑
(1) Add your Gemfile.
gem "need_label"
(2) Add validation on your model.
class User < ActiveRecord::Base validates :name, :presence => true end
(3) Add css. (Example)
label.need-label{ border-bottom: inset 2px red; }
Copyright¶ ↑
Copyright © 2011 Yamamoto Kazuhisa. See LICENSE.txt for further details.