Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 499 Bytes

README.rdoc

File metadata and controls

25 lines (17 loc) · 499 Bytes

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 © 2011 Yamamoto Kazuhisa. See LICENSE.txt for further details.