Skip to content

History / How To: Create a guest user

Revisions

  • Fix syntax highlighting

    @garrettmichaelgeorge garrettmichaelgeorge committed Mar 17, 2021
  • Small grammatical fix

    @garrettmichaelgeorge garrettmichaelgeorge committed Mar 17, 2021
  • Consistently use Ruby 1.9 hash syntax

    @garrettmichaelgeorge garrettmichaelgeorge committed Mar 16, 2021
  • FactoryGirl -> FactoryBot

    @okuramasafumi okuramasafumi committed Dec 15, 2020
  • Adding note that someone abstracted the work here.

    @Mirv Mirv committed May 1, 2018
  • create calls save

    @GriwMF GriwMF committed Oct 13, 2017
  • In the case session[:guest_user_id] is present but that user doesn't exists anymore in database(Can happen in dev environment) `guest_user` will return nil and nil.reload will give an exception.

    @peeyushsingla peeyushsingla committed May 25, 2017
  • Added testing instructions

    @1v 1v committed Apr 24, 2017
  • Updated How To: Create a guest user (markdown)

    @Judahmeek Judahmeek committed Feb 16, 2016
  • fix small grammatical error for clarification

    @shrugs shrugs committed Jan 5, 2016
  • Updated How To: Create a guest user (markdown)

    @johnknapp johnknapp committed Dec 22, 2015
  • Rails still has the associations to the guest_user cached after calling 'logging_in'. If the User model has a 'dependent: :destroy' parameter the associations will be deleted even if the user is changed. Reloading the guest user before destroying makes sure rails pick up the changes.

    @arkirchner arkirchner committed Nov 18, 2015
  • rm unnecessary profanity

    @bhaity bhaity committed Mar 2, 2015
  • Updated How To: Create a guest user (markdown)

    @victorhazbun victorhazbun committed Feb 26, 2015
  • the guest user code has two bugs: 1. with the warden strategy, it's possible for the current_user to be the guest_user, thus we need to check whether guest_user_id is equal to current_user.id to prevent it from being destroyed. 2. there is a possibility that we are unnecessarily creating then destroying a guest user

    @evie404 evie404 committed Oct 18, 2014
  • Fix `rand` in code so the upper bound is 99 instead of 98

    @roryokane roryokane committed Jul 19, 2014
  • Finder in authentication strategy could raise when guest record doesn't exist

    @RKushnir RKushnir committed Jun 17, 2014
  • Adds in a method for authenticating the guest user

    @Nejuf Nejuf committed Jun 9, 2014
  • Updated How To: Create a guest user (markdown)

    @betamax betamax committed May 6, 2014
  • Wrapped guest_user function in begin block for rescue. Additionally signed in guest user in the guest user function

    @cleathers cleathers committed Mar 25, 2014
  • Changed :receive_guess to :receive_guest. Pretty sure that's a spelling error.

    @holgersindbaek holgersindbaek committed Sep 8, 2013
  • Lack of checking return value from save method. Caching of guest_user instead of fetching it every time.

    @RobinDaugherty RobinDaugherty committed Mar 8, 2013
  • Updated How To: Create a guest user (markdown)

    @alexesDev alexesDev committed Feb 17, 2013
  • Updated How To: Create a guest user (markdown)

    @alexesDev alexesDev committed Feb 17, 2013
  • saves session[:guest_user_id] on create_guest_user method, to avoid multiple user creations in same session

    @monovaldes monovaldes committed Jan 21, 2013
  • Added instruction to make method available to views

    @chrise86 chrise86 committed Dec 11, 2012
  • Use `||=` idiom to create a guest user.

    hollowspace committed Oct 22, 2012
  • Had an extra 'end' (copy-paste error)

    mbrookes committed Jun 8, 2012
  • Added some (commented out) logging_in example code. Made logging_in private.

    mbrookes committed Jun 8, 2012
  • change generated email address to 'example.com' per RFC2606

    mbrookes committed Jun 8, 2012