Ruby Book List
You're taking your first steps into Ruby
A good introduction to programming in general. Easy on newer programmers.
|expect(@user).to have(1).error_on(:username) # Checks whether there is an error in username|
|expect(@user.errors[:username]).to include("can't be blank") # check for the error message|
A lot of important government documents are created and saved in Microsoft Word (*.docx). But Microsoft Word is a proprietary format, and it's not really useful for presenting documents on the web. So, I wanted to find a way to convert a .docx file into markdown.
On a mac you can use homebrew by running the command
brew install pandoc.
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