Skip to content

Commit

Permalink
Remove railtie
Browse files Browse the repository at this point in the history
Adman65 committed Dec 1, 2011
1 parent fffce85 commit 73ecb94
Showing 4 changed files with 8 additions and 18 deletions.
8 changes: 6 additions & 2 deletions lib/active_model_serializers.rb
Original file line number Diff line number Diff line change
@@ -25,8 +25,12 @@ def active_model_serializer

begin
require 'action_controller'
require 'rails'
require 'railtie'
require 'action_controller/serialization'

ActiveSupport.on_load(:action_controller) do
include ::ActionController::Serialization
end
rescue LoadError => ex
puts ex
# rails on installed, continuing
end
14 changes: 0 additions & 14 deletions lib/railtie.rb

This file was deleted.

2 changes: 0 additions & 2 deletions test/serialization_test.rb
Original file line number Diff line number Diff line change
@@ -39,8 +39,6 @@ def as_json(*)
end

class TestController < ActionController::Base
include ActionController::Serialization

protect_from_forgery

serialization_scope :current_user
2 changes: 2 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
@@ -7,6 +7,8 @@
require "active_support/json"
require "test/unit"

require 'rails'

module TestHelper
Routes = ActionDispatch::Routing::RouteSet.new
Routes.draw do

0 comments on commit 73ecb94

Please sign in to comment.