Rails 5.0.0.1
Doorkeeper 4.2.6
Devise 4.2.0
Gemfile
from matplotlib import pyplot as plt | |
plt.style.use("fivethirtyeight") | |
COLORS = ['#456789', '#894567', '#678945', '#3B3D4B', '#FF8181'] | |
# Create data | |
x4 = ['$50K (Median Salary)', '$1 Million', '$1 Billion'] | |
y4 = [50000, 1000000, 1000000000] | |
# Create a figure and axis |
One of the many reasons I love working with Ruby is it has a rich vocabulary that allows you to accomplish your goals with a minimal amount of code. If there isn't a method that does exactly what you want, it's usually possible to build an elegant solution yourself.
Let's take the example of simulating the rolling of a die.
We can represent a die as an array of its faces.
die = [*?⚀..?⚅]
# => ["⚀", "⚁", "⚂", "⚃", "⚄", "⚅"]
# In config/initializers/local_override.rb: | |
require 'devise/strategies/authenticatable' | |
module Devise | |
module Strategies | |
class LocalOverride < Authenticatable | |
def valid? | |
true | |
end |