mirror of
https://github.com/drapergem/draper
synced 2023-03-27 23:21:17 -04:00
Rails 4 compatibility
This commit is contained in:
parent
c50970e1b8
commit
b2401c71e0
2 changed files with 6 additions and 1 deletions
|
@ -1,10 +1,11 @@
|
||||||
require 'active_support/core_ext/array/extract_options'
|
require 'active_support/core_ext/array/extract_options'
|
||||||
|
require 'active_model/serialization'
|
||||||
|
|
||||||
module Draper
|
module Draper
|
||||||
class Decorator
|
class Decorator
|
||||||
include Draper::ViewHelpers
|
include Draper::ViewHelpers
|
||||||
extend Draper::Delegation
|
extend Draper::Delegation
|
||||||
include ActiveModel::Serialization if defined?(ActiveModel::Serialization)
|
include ActiveModel::Serialization
|
||||||
|
|
||||||
# @return the object being decorated.
|
# @return the object being decorated.
|
||||||
attr_reader :source
|
attr_reader :source
|
||||||
|
|
4
spec/dummy/bin/rails
Executable file
4
spec/dummy/bin/rails
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env ruby
|
||||||
|
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
||||||
|
require_relative '../config/boot'
|
||||||
|
require 'rails/commands'
|
Loading…
Reference in a new issue