This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# def post(action_name, params_hash = {}, session_hash = {}) | |
describe PasswordResetsController do | |
describe "#create" do | |
it "does something when I post" do | |
post :create, user: { email: '[email protected]' } | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GMAIL_USERNAME: [email protected] | |
GMAIL_PASSWORD: my_secret_password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Adding datetime parameter to a URL | |
<%= link_to 'This Week', appointments_path(begin: DateTime.now.beginning_of_week) %> | |
Testing for the parameter | |
- if params.has_key?(:begin) | |
Parsing the parameter | |
- Time.parse(params[:begin]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
h2 { width:100%; text-align:center; border-bottom: 1px solid #000; line-height:0.1em; margin:10px 0 20px; } | |
h2 span { background:#fff; padding:0 10px; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="tel:+441213232122">KBHair: 0121-323-2122</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="apple-touch-icon" href="path/to/touchicon.png"> | |
<link rel="icon" href="path/to/favicon.png"> | |
<!--[if IE]><link rel="shortcut icon" href="path/to/favicon.ico"><![endif]--> | |
<!-- or, set /favicon.ico for IE10 win --> | |
<meta name="msapplication-TileColor" content="#D83434"> | |
<meta name="msapplication-TileImage" content="path/to/tileicon.png"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Minitest/Database_cleaner/ Minitest::Around | |
require 'minitest/around' | |
require 'database_cleaner' | |
DatabaseCleaner.strategy = :deletion <===? should it always be deletion? | |
class Capybara::Rails::TestCase | |
around do |test| | |
if metadata[:js] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Is link up up? | |
sudo ethtool [interface] | grep 'Link detected' | |
- expect to see yes | |
Is interface up? | |
sudo ifconfig [interface] | grep 'inet addr' | |
Is DNS working? | |
nslookup [server name] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
[WARN] table 'Permission' doesn't exist. Did you run the migration? Ignoring rolify config. | |
I, [2019-11-12T16:37:25.498358 #74224] INFO -- : Migrating to CreateMembers (20131017221407) | |
== 20131017221407 CreateMembers: migrating ==================================== | |
-- create_table(:members) | |
W, [2019-11-12T16:37:25.501252 #74224] WARN -- : DEPRECATION WARNING: `#timestamps` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in change at /Users/richard/Documents/code/projects/planner/db/migrate/20131017221407_create_members.rb:10) | |
-> 0.0067s | |
== 20131017221407 CreateMembers: migrated (0.0073s) =========================== |
OlderNewer