Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions lib/annotate/annotate_models.rb
Original file line number Diff line number Diff line change
Expand Up @@ -846,9 +846,7 @@ def ignored_translation_table_colums(klass)
# Construct the foreign column name in the translations table
# eg. Model: Car, foreign column name: car_id
foreign_column_name = [
klass.translation_class.to_s
.gsub('::Translation', '').gsub('::', '_')
.downcase,
klass.table_name.to_s.singularize,
'_id'
].join.to_sym

Expand Down
4 changes: 2 additions & 2 deletions spec/lib/annotate/annotate_models_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,8 @@ def mock_column(name, type, options = {})

context 'with Globalize gem' do
let :translation_klass do
double('Post::Translation',
to_s: 'Post::Translation',
double('Folder::Post::Translation',
to_s: 'Folder::Post::Translation',
columns: [
mock_column(:id, :integer, limit: 8),
mock_column(:post_id, :integer, limit: 8),
Expand Down