Rails 4 with Rspec 3
Configure your Gemfile
# Gemfile group :development, :test do gem 'rspec-rails', '~> 3.0.0' gem 'factory_girl_rails' gem 'capybara'
Include Weather Icons in your app: https://github.com/erikflowers/weather-icons
Include the below JSON in your application, for example purposes, lets assume it's a global named
Make a request to OpenWeatherMap:
req = $.getJSON('http://api.openweathermap.org/data/2.5/weather?q=London,uk&callback=?');
|_ = require 'underscore'|
|# Given an array of elements ELEM and a matching KEY value,|
|# will build the apprpriate projection to generate sortable|
|# weights for a mongo aggregator.|
|# ELEM: An array of values upon which to match against KEY|
|# KEY: The document field key to match against|
|# I: Default 0, index into array at which to begin|
#Simple Authentication with Bcrypt
This tutorial is for adding authentication to a vanilla Ruby on Rails app using Bcrypt and has_secure_password.
The steps below are based on Ryan Bates's approach from Railscast #250 Authentication from Scratch (revised).
You can see the final source code here: repo. I began with a stock rails app using
rails new gif_vault