Skip to content

Commit

Permalink
not break when no response
Browse files Browse the repository at this point in the history
  • Loading branch information
ywen2 committed Oct 12, 2011
1 parent 7433e48 commit be844eb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/rest_resource/resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def url
end

def initialize(params={})
return if params.blank?
params_hash = (params.is_a?(String)) ? ActiveSupport::JSON.decode(params) : params
@attributes = params_hash
(class << self; self; end).class_eval do
Expand Down

0 comments on commit be844eb

Please sign in to comment.