Invalid authenticity tokens when using subdomains

Does anyone have experience with using subdomains and rails? The example that I used to help me out was from the Advanced Rails Recipes book, but I can't get it working as it should.

I continually get authenticity token errors after logging in. I have had this error before, and for whatever reason after I added a<%= token_tag %> to the form it worked, but it doesn't work in this case.

Any clues to why this is happening?

Thanks for the help

Don't forget to include in your forms a hidden field with: name: request_forgery_protection_token.to_s value: form_authenticity_token

At least that's what I do when I'm sending custom POST requests.

Lobo tuerto Cazador wrote:

Don't forget to include in your forms a hidden field with: name: request_forgery_protection_token.to_s value: form_authenticity_token

At least that's what I do when I'm sending custom POST requests.

what is the benefit of that in comparison to the authenticity token (input name="authenticity_token" type="hidden" value="7cd3363a03957d3d4...), which is what is also generated by the token_tag method?