Skip to content

Instantly share code, notes, and snippets.

@Zhomart
Forked from anonymous/gist:3135622
Created July 18, 2012 11:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Zhomart/3135627 to your computer and use it in GitHub Desktop.
Save Zhomart/3135627 to your computer and use it in GitHub Desktop.
def create
raise "I'm here"
build_resource
if resource.save
// resource is your user
@facebookdata = resource.facebook_data.new
@facebookdata.likes = "likes"
@facebookdata.groups = "groups"
@facebookdata.save!
if resource.active_for_authentication?
set_flash_message :notice, :signed_up if is_navigational_format?
sign_in(resource_name, resource)
respond_with resource, :location => after_sign_up_path_for(resource)
else
set_flash_message :notice, :"signed_up_but_#{resource.inactive_message}" if is_navigational_format?
expire_session_data_after_sign_in!
respond_with resource, :location => after_inactive_sign_up_path_for(resource)
end
else
clean_up_passwords resource
respond_with resource
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment