Displaying 2 results from an estimated 2 matches for "iso_639_2".
2010 Aug 28
1
validates_uniqueness_of missing in rails 3.0 rc2?
...validates_uniqueness_of :language, :scope => :book_id
validate :language, :is_proper_language_code
validates_presence_of :value
belongs_to :book
def is_proper_language_code
errors.add(:base, "invalid language code") unless !ISO_639::ISO_639_2.find{ |lang| lang[0] == self.language }.nil?
end
end
Class 2:
class Book < ActiveRecord::Base
attr_accessible :titles
validates_presence_of :titles
has_many :titles
end
Spec:
before(:each) do
@valid_title_attributes = {:book_id => 1, :language => &q...
2006 Jun 05
0
Failed to install Globalize plugin
...language_id])
-> 0.2310s
-- add_index(:globalize_translations, [:table_name, :item_id,
:language_id])
-> 0.2200s
-- create_table(:globalize_languages, {:force=>true})
-> 0.1700s
-- add_index(:globalize_languages, :iso_639_1)
-> 0.2810s
-- add_index(:globalize_languages, :iso_639_2)
-> 0.2200s
-- add_index(:globalize_languages, :iso_639_3)
-> 0.2300s
-- add_index(:globalize_languages, :rfc_3066)
-> 0.2910s
rake aborted!
Mysql::Error: Data too long for column ''currency_format'' at row 1:
INSERT INTO globalize_countries (`id`, `code`, `englis...