You showed me the following output
Started PUT "/user/partner_acceptances/55" for ip at 2013-03-19 03:20:50 -0700
Processing by Users::SomeController#update as JSON
Parameters: {"utf8"=>"✓", "authenticity_token"=>"removed", "application"=>{"full_name"=>"Full Name", "address_1"=>"123 Sesame Street", "adult"=>"1", "guardian_full_name"=>"G Name", "telephone"=>"3141592653", "address_2"=>"Beverly Hills, CA 90210", "guardian_email"=>"email@gmail.com"}, "id"=>"55"}
then there's a bunch of sql stuff which I cannot imagine you'd need, then
Started GET "/user/partner_acceptances55/partner_agreements/new" for ip at 2013-03-19 03:20:51 -0700
Processing by Users::SomeController
Parameters: {"partner_id"=>"55"}
which is a "new" action
and has absolutely NOTHING to do with the update action you just posted.
I assume that that action looks like this
module Users
class SomeController < ApplicationController
include BaseConcern
include PartnerApplicationConcern
before_filter :set_application
def new
if @application.adult?
response = request_agreement
unless response.nil?
@application.update_attribute( :agreement_key, response.document_key )
redirect_to response.url
end
else
response = request_minor_agreement
unless response.nil?
@application.update_attribute( :agreement_key, response.document_key )
end
end
end
end
end
If I have that wrong then please state the full sequence of events
As for
You're still not disproving why @application.guardian_email works in the conditional statement with your belief that I not updating the attributes.
I don't really understand what you are asking here
if @application.guardian_email = "email@gmail.com" will always return true regardless of the value of @application.guardian_email
e.g.
@application.guardian_email = "fred"
if @application.guardian_email = "email@gmail.com"
# this condition will always be met. and the value of @application.guardian_email will now be email@gmail.com
end
You used that statement to prove that attributes are being set when it proves absolutely nothing
What you want and what you need are too often not the same thing!
When your head is hurting from trying to solve a problem, stop standing on it. When you are the right way up you will see the problem differently and you just might find the solution.
(Quote by me 15th July 2009)