Sha256: 73b4b2876bbde422ec7fd1c3b89f9fe2c4962b441a472d164f249cea781bc03c

Contents?: true

Size: 393 Bytes

Versions: 50

Compression:

Stored size: 393 Bytes

Contents

module AuthenticationHelper
  # controller return 1. Session 2. Cookies ==> user.id
  def sign_in(user)
    @user = user
    current_ma_user
  end

  def create_and_sign_in_user
    user = FactoryBot.create(:user)
    sign_in(user)
    return user
  end
	# from Jinda::Helpers
  def  current_ma_user 
       @user ||= User.where(:auth_token => user.auth_token)
       return @user
  end

end

Version data entries

50 entries across 47 versions & 4 rubygems

Version Path
jinda-0.8.0 test/dummy/spec/support/authentication_helper.rb
jinda-0.8.0 lib/generators/jinda/templates/spec/support/authentication_helper.rb
jinda-0.7.7.4 lib/generators/jinda/templates/spec/support/authentication_helper.rb
jinda-0.7.7.4 test/dummy/spec/support/authentication_helper.rb
jinda-0.7.7.3 test/dummy/spec/support/authentication_helper.rb
jinda-0.7.7.3 lib/generators/jinda/templates/spec/support/authentication_helper.rb
jinda-0.7.7.2 lib/generators/jinda/templates/spec/support/authentication_helper.rb
jinda-0.7.7.1 lib/generators/jinda/templates/spec/support/authentication_helper.rb
jinda_mind-1.0.0 lib/generators/jinda/templates/spec/support/authentication_helper.rb
jinda-0.7.7 lib/generators/jinda/templates/spec/support/authentication_helper.rb
jinda-0.7.6 lib/generators/jinda/templates/spec/support/authentication_helper.rb
jinda-0.7.5.5 lib/generators/jinda/templates/spec/support/authentication_helper.rb
jinda-0.7.5.4 lib/generators/jinda/templates/spec/support/authentication_helper.rb
jinda-0.7.5.3 lib/generators/jinda/templates/spec/support/authentication_helper.rb
jinda-0.7.5.2 lib/generators/jinda/templates/spec/support/authentication_helper.rb
jinda-0.7.5.0 lib/generators/jinda/templates/spec/support/authentication_helper.rb
jinda-0.7.3 lib/generators/jinda/templates/spec/support/authentication_helper.rb
jinda-0.7.2 lib/generators/jinda/templates/spec/support/authentication_helper.rb
jinda-0.7.1 lib/generators/jinda/templates/spec/support/authentication_helper.rb
jinda-0.7.0.4 lib/generators/jinda/templates/spec/support/authentication_helper.rb