create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
#Model | |
@user.should have(1).error_on(:username) # Checks whether there is an error in username | |
@user.errors[:username].should include("can't be blank") # check for the error message | |
#Rendering | |
response.should render_template(:index) | |
#Redirecting | |
response.should redirect_to(movies_path) |
# Resize selenium browser window to avoid Selenium::WebDriver::Error::MoveTargetOutOfBoundsError errors | |
# | |
# Example usage with Rspec (in spec/support/spec_helper.rb): | |
# | |
# config.before(:each) do | |
# set_selenium_window_size(1250, 800) if Capybara.current_driver == :selenium | |
# end | |
# | |
def set_selenium_window_size(width, height) | |
window = Capybara.current_session.current_window.resize_to |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
require 'bundler/setup' | |
require 'active_record' | |
include ActiveRecord::Tasks | |
db_dir = File.expand_path('../db', __FILE__) | |
config_dir = File.expand_path('../config', __FILE__) | |
DatabaseTasks.env = ENV['ENV'] || 'development' |
This is a mix between two sources:
basically the first resource is great but didn't work for me: I had to remove the trailing "/*" in the resource string to make it work. I also noticed that setting the policy on the source bucket was sufficient. In the end these are the exact steps I followed to copy data between two buckets on two accounts
Basically the idea there is:
The purpose of design is to allow you to do design later, and it's primary goal is to reduce the cost of change.
# config/routes.rb | |
resources :documents do | |
scope module: 'documents' do | |
resources :versions do | |
post :restore, on: :member | |
end | |
resource :lock | |
end | |
end |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.