In order for a CA resident to purchase an AR-15 in another state he would have to establish a residence in that state.
Federal law prohibits the sale of a firearm to a resident of another state where such firearm is prohibited.
To assist dealers in complying with the law the ATF publishes a compendium of all State firearm laws.
[url]www.atf.treas.gov/firearms/statelaws/22edition.htm[/url]
ATF FAQ:
(B2) From whom may an unlicensed person acquire a firearm under the GCA?
A person may only buy a firearm within the person’s own State, except that he or she may buy a rifle or shotgun, in person, at a licensee's premises in any State, [b]provided the sale complies with State laws applicable in the State of sale and the State where the purchaser resides.[/b]
[18 U.S.C 922(a)(3) and (5), 922(b)(3), 27 CFR 178.29]
PART 178--COMMERCE IN FIREARMS AND AMMUNITION
§178.96 Out-of-State and mail order sales.
(c)(1) A licensed importer, licensed manufacturer, or licensed dealer may sell or deliver a rifle or shotgun, and a licensed collector may sell or deliver a rifle or shotgun that is a curio or relic to a nonlicensed resident of a State other than the State in which the licensee's place of business is located if--
(i) The purchaser meets with the licensee in person at the licensee's premises to accomplish the transfer, sale, and delivery of the rifle or shotgun;
(ii) The licensed importer, licensed manufacturer, or licensed dealer complies with the provisions of Sec. 178.102; (iii) The purchaser furnishes to the licensed importer, licensed manufacturer, or licensed dealer the firearms transaction record, Form 4473, required by Sec. 178.124; and
[b](iv) The sale, delivery, and receipt of the rifle or shotgun fully comply with the legal conditions of sale in both such States.
(2) For purposes of paragraph (c) of this section, any licensed manufacturer, licensed importer, or licensed dealer is presumed, in the absence of evidence to the contrary, to have had actual knowledge of the State laws and published ordinances of both such States.[/b]