Skip to content

Remove the duplicate method named self.new_from_response #557

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions lib/zendesk_api/resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,6 @@ def initialize(client, attributes = {})
@attributes.clear_changes unless new_record?
end

def self.new_from_response(client, response, includes = nil)
new(client).tap do |resource|
resource.handle_response(response)
resource.set_includes(resource, includes, response.body) if includes
resource.attributes.clear_changes
end
end

# Passes the method onto the attributes hash.
# If the attributes are nested (e.g. { :tickets => { :id => 1 } }), passes the method onto the nested hash.
def method_missing(*args, &block)
Expand Down