Skip to content

Commit

Permalink
Removed Spree::PaymentMethod.current and current_gateway() helper
Browse files Browse the repository at this point in the history
  • Loading branch information
Trung Lê committed Mar 11, 2012
1 parent bbac985 commit df32600
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
6 changes: 0 additions & 6 deletions core/app/models/spree/payment_method.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ def self.active?
self.count(:conditions => { :type => self.to_s, :environment => Rails.env, :active => true }) > 0
end

# TODO: Remove this method by 1.0
def self.current
ActiveSupport::Deprecation.warn "Gateway.current is deprecated and will be removed in Spree > 1.0. Use current_order.payment_method instead."
first(:conditions => { :active => true, :environment => Rails.env })
end

def method_type
type.demodulize.downcase
end
Expand Down
6 changes: 0 additions & 6 deletions core/lib/spree/core/controller_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ def self.included(receiver)
receiver.send :helper_method, 'title='
receiver.send :helper_method, 'accurate_title'
receiver.send :helper_method, 'get_taxonomies'
receiver.send :helper_method, 'current_gateway'
receiver.send :helper_method, 'current_order'
receiver.send :include, SslRequirement
receiver.send :include, Spree::Core::CurrentOrder
Expand Down Expand Up @@ -83,11 +82,6 @@ def instantiate_controller_and_action_names
def get_taxonomies
@taxonomies ||= Taxonomy.includes(:root => :children).joins(:root)
end

def current_gateway
ActiveSupport::Deprecation.warn "current_gateway is deprecated and will be removed in Spree > 1.0"
@current_gateway ||= Gateway.current
end

def associate_user
return unless current_user and current_order
Expand Down

0 comments on commit df32600

Please sign in to comment.