Skip to content

Commit

Permalink
Fix incompatibility presented with 4.2 code
Browse files Browse the repository at this point in the history
Update the code that uses the internal rails api to be compatible with rails 4.2.

> ActiveRecord::Base#reflections now returns a hash with string keys instead of symbol keys.

[PR] rails/rails#17718
  • Loading branch information
fragoulis committed Sep 11, 2015
1 parent e7b5b86 commit 8eb77e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/agile_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def serialization_options(set)
hash.merge(class_name)
else
begin
true_name = reflections[class_name].options[:class_name] || class_name
true_name = reflections[class_name.to_s].options[:class_name] || class_name
klass = true_name.to_s.classify.constantize
hash[class_name] = klass.serialization_options(set)
hash
Expand Down

0 comments on commit 8eb77e7

Please sign in to comment.