No description or website provided.
Ruby JavaScript CSS
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
bin
config
db/migrate
lib
spec
.gitignore
.rspec
Gemfile
Gemfile.lock
MIT-LICENSE
README.md
Rakefile
subscribem.gemspec

README.md

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.