Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

X-Post method error and Rakefile configuration #20

Closed
wants to merge 4 commits into from

2 participants

Eric Lee Isaac Hall
Eric Lee

0ca804d - uses the current instance's base class to find the known_attributes method since it is not present on each instance of the class.

7ebec3d - the configuration is not loaded into Recurly::Base but into a separate hash, so use that hash.

Eric Lee added some commits
Isaac Hall
Owner

Thanks!

Isaac Hall isaachall closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 18, 2011
  1. If the Recurly::Account class has not yet been loaded, Recurly::Coupo…

    Eric Lee authored
    …n cannot find the deprecated RecurlyAccountBase class. Switch to using the Recurly::AccountBase class directly.
Commits on Mar 19, 2011
Commits on Apr 4, 2011
  1. Merge remote branch 'upstream/master'

    Eric Lee authored
  2. The known_attributes method is present on the class, not the instance…

    Eric Lee authored
    … of the object
This page is out of date. Refresh to see the latest.
2  lib/recurly/base.rb
View
@@ -92,7 +92,7 @@ def load_attributes_from_response(response)
def load_errors_from_array(new_errors, save_cache = false)
errors.clear unless save_cache
return if new_errors.nil? or new_errors.empty?
- humanized_attributes = Hash[self.known_attributes.map { |attr_name| [attr_name.humanize, attr_name] }] unless self.known_attributes.nil?
+ humanized_attributes = Hash[self.class.known_attributes.map { |attr_name| [attr_name.humanize, attr_name] }] unless self.class.known_attributes.nil?
humanized_attributes ||= Hash[@attributes.keys.map { |attr_name| [attr_name.humanize, attr_name] }]
new_errors.each do |error|
if error.is_a?(Hash)
2  lib/recurly/coupon.rb
View
@@ -1,5 +1,5 @@
module Recurly
- class Coupon < RecurlyAccountBase
+ class Coupon < AccountBase
self.element_name = "coupon"
def self.known_attributes
4 lib/recurly/rails3/recurly.rake
View
@@ -38,7 +38,7 @@ namespace :recurly do
# now lets clear site data
begin
- RestClient.post( Recurly::Base.site+"/site/test_data",
+ RestClient.post( @recurly_config["site"]+"/site/test_data",
{"_method"=>"delete"},
:cookies => login_response.cookies)
raise "Clearing Didn't work for some reason. Is your site setting correct?"
@@ -68,4 +68,4 @@ namespace :recurly do
# saves the yml file
Recurly::ConfigParser.save(@recurly_config)
end
-end
+end
Something went wrong with that request. Please try again.