Giter Club home page Giter Club logo

beta_invites's Introduction

BetaInvites

This adds a beta_invites mvc that comliments devise_invitable. It can be production ready if you make sure to review the generated files and do a manual test run.

Installation:

add to your gemfile: ““ gem ‘devise’, ‘~>3.2.0’ gem ‘devise_invitable’ gem ‘beta_invites’, github: ‘danman01/beta_invites’ “‘

Before you launch:

  • Add gems devise and devise_invitable to your gemfile

  • Create a User class (or some other class to work with)

  • Run the Devise installer. [Instructions](github.com/plataformatec/devise)

  • Run the devise invitable installer. [Instructions](github.com/scambra/devise_invitable)

  • Run rake beta_invites:install:migrations && rake db:migrate

  • Mount application in routes file: ‘mount BetaInvites::Engine, at: “/beta_invites”`

  • You may want to run the mailer generator: rails g beta_invites:mailer

    • This will create ‘app/mailers/user_mailer.rb`, `app/views/user_mailer/notify_invitee.html.erb` and `notify_admins.html.erb`, which you should definitely look at.

  • If you chose a different class name than User, declare class in an initializer (defaults to User). Not sure if this initializer works yet…

  • Make sure to set up your email credentials. Mandrill is a good free service to use, or you can use google apps or microsoft.

Rails email setup [from Mandrill](help.mandrill.com/entries/21738467-Using-Mandrill-s-SMTP-integration-with-Web-Frameworks) “‘ YourApp::Application.configure do

config.action_mailer.smtp_settings = {
  :address   => "smtp.mandrillapp.com",
  :port      => 25, # ports 587 and 2525 are also supported with STARTTLS
  :enable_starttls_auto => true, # detects and uses STARTTLS
  :user_name => "MANDRILL_USERNAME",
  :password  => "MANDRILL_PASSWORD", # SMTP password is any valid API key
  :authentication => 'login', # Mandrill supports 'plain' or 'login'
  :domain => 'yourdomain.com', # your domain to identify your server when connecting
}

# …

end

# app/mailers/your_mailer.rb

class YourMailer < ActionMailer::Base

def email_name
  mail :subject => "Mandrill rides the Rails!",
       :to      => "[email protected]",
       :from    => "[email protected]"
end

end

# In a controller: YourMailer.email_name.deliver “‘

TODO

  • Write tests

  • Ability to config user class with an initializer

beta_invites's People

Contributors

danman01 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.