hi, I don''t know how to change field names in error messages. if I add error message like this: errors.add( "age", "You must be at least 18 years old" ) unless age >= 18 when error occures this text is displayed Age You must be at least 18 years old so the first word(s) is column human name for that attribute. how can I change that? of course only in error message text. thanx -- Posted via http://www.ruby-forum.com/.
anu_spam-lists@yahoo.com
2006-Mar-07 09:38 UTC
[Rails] code generator is failing all of a sudden..
I don''t remember changing anything in my rails environment, but I have
now been getting following error anytime I attempt to use script/generate tool
in rails:
c:/Apache/Ruby/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/initializer.rb:155:in
`load_environment'': undefined local variable or method `b'' for
#<Rail
s::Initializer:0x38d5b10> (NameError)
from
c:/Apache/Ruby/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/initializer.rb:155:in
`load_environment''
from
c:/Apache/Ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/core_ext/kernel.rb:27:in
`silence_warnings''
from
c:/Apache/Ruby/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/initializer.rb:152:in
`load_environment''
from
c:/Apache/Ruby/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/initializer.rb:81:in
`process''
from
c:/Apache/Ruby/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/initializer.rb:42:in
`run''
from ./script/../config/../config/environment.rb:10
from
c:/Apache/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
`require''
from
c:/Apache/Ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:214:in
`require''
from
c:/Apache/Ruby/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/commands/generate.rb:1
from
c:/Apache/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
`require''
from
c:/Apache/Ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:214:in
`require''
from script/generate:3
Any suggestion? I cannot think of anything
Anu
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060307/20b581e5/attachment-0001.html