kangkyu / haikus-html

0 stars 0 forks source link

use ActiveModel #1

Open kangkyu opened 8 years ago

kangkyu commented 8 years ago

activeresource gem was used in previous rails versions, but they deprecated it in favor of HTTParty+ActiveModel like solutions.

rails-consuming-internal-rest-api

kangkyu commented 8 years ago
class Haiku
  include ActiveModel::Serialization

  def initialize
  end
end

activemodel-make-any-ruby-object-feel-like-activerecord