Skip to content

Commit

Permalink
Rails 4 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
haines committed Jan 15, 2013
1 parent c50970e commit b2401c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/draper/decorator.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
require 'active_support/core_ext/array/extract_options'
require 'active_model/serialization'

module Draper
class Decorator
include Draper::ViewHelpers
extend Draper::Delegation
include ActiveModel::Serialization if defined?(ActiveModel::Serialization)
include ActiveModel::Serialization

# @return the object being decorated.
attr_reader :source
Expand Down
4 changes: 4 additions & 0 deletions spec/dummy/bin/rails
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env ruby
APP_PATH = File.expand_path('../../config/application', __FILE__)
require_relative '../config/boot'
require 'rails/commands'

0 comments on commit b2401c7

Please sign in to comment.