Hi,

I am using a model which is not an ActiveRecord.
>>>>>>>>>>>>>>

class ContactFormPresenter
  include Validatable

  ATTRIBUTES = %w(name email subject comment)
  ATTRIBUTES.each { |name| attr_accessor name }

  ATTRIBUTES.each { |name| validates_presence_of name }
  validates_format_of :email, :with => RegexCollection::EMAIL_REGEX

  def initialize(attributes = nil)
    ATTRIBUTES.each { |name| self.send("#{name}=",
attributes[name.to_sym]) } if attributes.is_a?(Hash)
  end
end

<<<<<<<<<<<<<<

if i don't put the :message =>
I18n.t(:'activerecord.errors.messages.blank') , I only get the
base_locale translation.

btw. I would like to translate these attributes like ActiveRecords
Attributes. how are the keys for that? active records are:

de:
  activerecord:
    attributes:
       <modelname>:
           <attributename>:

do you have any hints for me, solving that?

thanks for help.

florian

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"rails-i18n" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rails-i18n?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to