Skip to content

Commit

Permalink
Generator now properly detects ApplicationSerializer
Browse files Browse the repository at this point in the history
  • Loading branch information
fab committed Feb 1, 2014
1 parent 39b2a2b commit a49e04a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def parent_class_name
if options[:parent]
options[:parent]
elsif (ns = Rails::Generators.namespace) && ns.const_defined?(:ApplicationSerializer) ||
defined?(::ApplicationSerializer)
(Object.const_get(:ApplicationSerializer) rescue nil)
'ApplicationSerializer'
else
'ActiveModel::Serializer'
Expand Down

0 comments on commit a49e04a

Please sign in to comment.