Skip to content

Commit

Permalink
Fix foreign_key containing the namespace in the active record table b…
Browse files Browse the repository at this point in the history
…ackend
  • Loading branch information
divanburger committed Jan 31, 2024
1 parent bc5d7a7 commit b4b5b64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mobility/backends/active_record/table.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class << self
def configure(options)
table_name = model_class.table_name
options[:table_name] ||= "#{table_name.singularize}_translations"
options[:foreign_key] ||= table_name.downcase.singularize.camelize.foreign_key
options[:foreign_key] ||= table_name.classify.foreign_key
if (association_name = options[:association_name]).present?
options[:subclass_name] ||= association_name.to_s.singularize.camelize.freeze
else
Expand Down

0 comments on commit b4b5b64

Please sign in to comment.