Skip to content

Updated version with ruby-2.3.1 and rails-5.0.1 and helpful gems

Notifications You must be signed in to change notification settings

kefiriaus/ruby-rails-sample

 
 

Repository files navigation

ruby-rails-sample with external api auth

This is a simple Ruby app using the Rails framework with added login/logout/register/restore_password logic with external API and Devise without using DB.

Versions

Landing page with external auth API

Added gems:

# Add compatibility with jquery
gem 'jquery-turbolinks', '~> 2.1'

# Auth
gem 'devise'
gem 'devise-i18n'

# Email validator
gem 'validates_email_format_of'

# Error pages
gem 'gaffe'

Added development gems:

gem "better_errors"
gem "binding_of_caller"

gem 'rubocop' # to check Ruby code
gem 'scss-lint' # to check SCSS code

gem 'phare' # check for coding style errors

Running Locally

Make sure you have Ruby, Bundler installed.

git clone -b external-api-auth [email protected]:kefiriaus/ruby-rails-sample.git ruby-rails-sample-external-api-auth
cd ruby-rails-sample-external-api-auth
bundle install
rails s

Your app should now be running on localhost:3000.

Added controller methods

user_signed_in? # Checking user authorization

current_user # Add @current_user variable

Added view helpers

user_signed_in?

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 82.3%
  • HTML 7.2%
  • JavaScript 6.1%
  • CSS 2.5%
  • CoffeeScript 1.9%