From your link, look at the method current_or_guest_user
, it just calls guest_user
which calls create_guest_user
.
If you want to leave create_guest_user
, then just create a post controller action for handling your form and it can call create_guest_user
since your controller method should extend ApplicationController
, which is where the create_guest_user
method is declared private.
class ApplicationController < ActionController::Base
def public_method
# you can call private methods from inside the same class so this is valid
private_method
end
private
def private_method
end
end
class LocationController < ApplicationController
def location_public_method
# you can call private methods from ApplicationController since LocationController extends ApplicationController so this is valid
private_method
end
end