Skip to content

Commit

Permalink
FIXED LOCALIZED MODEL TO WAIT FOR TRANLSATIONS TABLE TO CREATED
Browse files Browse the repository at this point in the history
  • Loading branch information
alextk committed Jul 26, 2011
1 parent df6e11b commit a895a8b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions enum_records.gemspec
Expand Up @@ -5,11 +5,11 @@

Gem::Specification.new do |s|
s.name = %q{enum_records}
s.version = "0.1.1"
s.version = "0.1.2"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Alex Tkachev"]
s.date = %q{2011-07-25}
s.date = %q{2011-07-26}
s.description = %q{This gem allows to create enum records (named records) and to retrieve them easily. Supports globalize3 localization in enum fields initialization. }
s.email = %q{tkachev.alex@gmail.com}
s.extra_rdoc_files = [
Expand Down
2 changes: 1 addition & 1 deletion lib/enum_records.rb
Expand Up @@ -60,7 +60,7 @@ def initialize model_class, &block

def add_new_enum(method_sym, options)
# Check that the model's translation table exist if locales are passed so that in migration we will not have an exception
return if @model_class._enums[:globalized] && !options[:locales].blank? && !@model_class.connection.table_exists?(@model_class.translations_table_name)
return if @model_class._enums[:globalized] && !@model_class.connection.table_exists?(@model_class.translations_table_name)

enum_name = method_sym.to_s
@model_class._enums[:definitions][enum_name] = options
Expand Down

0 comments on commit a895a8b

Please sign in to comment.