hi i am developing my first app with ror and i have experience and
problem which i could not solve so far … i need a hand please
following scenario…
- i have a file config/project.rb (my application specifc
configurations) with a module “Project” which holds a constant
EMAIL_PATTERN (with a regex pattern for email validation) - i load this file in the environment.rb with require_dependency
“project” - i have a user model which includes
validates_format_of :email, :with => PROJECT::EMAIL_PATTERN
the problem now:
i have a view for the user which is fine on the first load … but when i
submit the form within the view (postback) then i got the error
uninitialized constant User::Project
i dont understand this because i have several unit test which test the
functionality of validating and there the pattern is applied fine. it
has only a problem after postback…
any ideas?