Created
July 7, 2014 11:04
-
-
Save philandstuff/a6f6682e99a4af32112a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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