Skip to content

tonilin/subscribem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

102 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Subscribem

How to use?

Create a new rails app:

$ rails new new_app --skip-test-unit -d mysql

Installing Subscribem

Add subscribem to Gemfile

gem "subscribem", :github => "tonilin/subscribem"

Run bundle install

$ bundle install

Add following line to config/routes.rb

mount Subscribem::Engine, :at => "/"

Setting Databasee

Edit config/database.yml and run rake db:create

Import subscribem schemas

$ rake railties:install:migrations

Run migrate

$ rake db:migrate

Change cookies setting

Edit /spec/dummy/config/initializers/session_store.rb, Add the domain option (Replace Dummy to your app name):

Dummy::Application.config.session_store :cookie_store, key: '_dummy_session', domain: "example.com"

Launch the app

$ powder link 
$ powder open

And then you can see a simple authentication with subdomain

Helpers

current_account to fetch current subdomain associated account.

current_user to fetch the current user.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published