mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-23 06:16:50 +00:00
require rails >= 3.2
* remove ancient confusing comment in SerializerGenerator
This commit is contained in:
parent
d10b5f6ac0
commit
31e1dab69f
@ -44,6 +44,8 @@
|
||||
|
||||
* Remove support for ruby 1.8 versions.
|
||||
|
||||
* Require rails >= 3.2.
|
||||
|
||||
# VERSION 0.8.1
|
||||
|
||||
* Fix bug whereby a serializer using 'options' would blow up.
|
||||
|
||||
@ -19,9 +19,9 @@ Gem::Specification.new do |gem|
|
||||
|
||||
gem.required_ruby_version = ">= 1.9.2"
|
||||
|
||||
gem.add_dependency "activemodel", ">= 3.0"
|
||||
gem.add_dependency "activemodel", ">= 3.2"
|
||||
|
||||
gem.add_development_dependency "rails", ">= 3.0"
|
||||
gem.add_development_dependency "rails", ">= 3.2"
|
||||
gem.add_development_dependency "pry"
|
||||
gem.add_development_dependency "simplecov"
|
||||
gem.add_development_dependency "coveralls"
|
||||
|
||||
@ -11,8 +11,6 @@ if defined?(Rails)
|
||||
module ActiveModel
|
||||
class Railtie < Rails::Railtie
|
||||
generators do |app|
|
||||
app ||= Rails.application # Rails 3.0.x does not yield `app`
|
||||
|
||||
Rails::Generators.configure!(app.config.generators)
|
||||
Rails::Generators.hidden_namespaces.uniq!
|
||||
require_relative "generators/resource_override"
|
||||
|
||||
@ -25,9 +25,6 @@ module Rails
|
||||
def parent_class_name
|
||||
if options[:parent]
|
||||
options[:parent]
|
||||
# Only works on 3.2
|
||||
# elsif (n = Rails::Generators.namespace) && n.const_defined?(:ApplicationSerializer)
|
||||
# "ApplicationSerializer"
|
||||
elsif defined?(::ApplicationSerializer)
|
||||
"ApplicationSerializer"
|
||||
else
|
||||
|
||||
Loading…
Reference in New Issue
Block a user