Sha256: c9c12c814daa8ae268acafb0bf3c1a82a30a8463a969a8d765808dba196b6a47
Contents?: true
Size: 479 Bytes
Versions: 1
Compression:
Stored size: 479 Bytes
Contents
Application.class_eval do helpers do def errors_on(attribute) @user && @user.errors.on(attribute) end def field(attribute, question) partial( :field, :locals => { :attribute => attribute, :question => question } ) end def valid?(attribute=nil) if attribute @user && @user.errors.on(attribute).nil? else @user && @user.valid? end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
winton-sum-0.1.0 | lib/sum/helper/new.rb |