Skip to content

Instantly share code, notes, and snippets.

@philandstuff
Created July 7, 2014 11:04
Show Gist options
  • Save philandstuff/a6f6682e99a4af32112a to your computer and use it in GitHub Desktop.
Save philandstuff/a6f6682e99a4af32112a to your computer and use it in GitHub Desktop.
class Need
extend ActiveModel::Naming
attr_reader :id
attr_accessor :role, :goal, :benefit
def initialize(id, exists=false)
need = need_api_client.need(id)
if exists
assign_protected_attributes(need)
end
assign_filtered_attributes(need)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment