lib/todoable_api/base_model.rb
# Given a hash, assign instance variables to each model based on hash input
Given a hash, assign instance variables to each model based on hash input
Given a hash assign instance variables to each model based on hash input
def assign_attributes(attributes = {})
      @attributes = attributes
      attributes.each do |key, value|
        instance_variable_set("@#{key}", value)
      end
    end
def assign_attributes ( attributes = { } ) @attributes = attributes attributes . each do | key , value | instance_variable_set ( "@#{key}" , value ) end end
Given a hash, assign instance variables to each model based on hash input
Given a hash assign instance variables to each model based on hash input
attributes