def profile_images(params, admin)

      Admin.deal_with_profile_images(admin, upload_images(params[:admin][:avatar], admin.username), 'avatar') if !params[:admin][:avatar].blank?
      Admin.deal_with_profile_images(admin, upload_images(params[:admin][:cover_picture], admin.username), 'cover_picture') if !params[:admin][:cover_picture].blank?

    end
def profile_images(params, admin)

      Admin.deal_with_profile_images(admin, upload_images(params[:admin][:avatar], admin.username), 'avatar') if !params[:admin][:avatar].blank?
      Admin.deal_with_profile_images(admin, upload_images(params[:admin][:cover_picture], admin.username), 'cover_picture') if !params[:admin][:cover_picture].blank?

    end
deals with the user images (profile/cover images)
 Params:
 +params+:: parameters
 +attribute+:: admin ActiveRecord object