added update_attribute method to base.rb