$ yum update
$ yum install curl git vim`
$ git config --global user.name "Your name"
$ git config --global user.email "[email protected]"
| { | |
| // http://guides.rubyonrails.org/contributing_to_ruby_on_rails.html | |
| "tab_size": 2, | |
| "translate_tabs_to_spaces": true | |
| } |
$ yum update
$ yum install curl git vim`
$ git config --global user.name "Your name"
$ git config --global user.email "[email protected]"
I have two models, Post and Tag. This is not my real scenario. In order to simplify it, lets assume that:
:draft. The reason is so that user could not be bothered with validation when all they want is just save Post as a draft.This is the models that I have in mind:
# Post model
class Post < ActiveRecord::Base
| #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) |
| gem "bower-rails", "~> 0.8.3" |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| # explicitly disable mouse control | |
| setw -g mode-mouse off | |
| set -g mouse-select-pane off | |
| set -g mouse-resize-pane off | |
| set -g mouse-select-window off | |
| # Disable window rename | |
| set-option -g allow-rename off | |
| # Start windows and panes at 1, not 0 |
| # put this in your staging.rb file. Obviously you'll need more config than this it's just an example. | |
| Rails.application.configure do | |
| config.action_mailer.preview_path ||= defined?(Rails.root) ? "#{Rails.root}/test/mailers/previews" : nil | |
| config.autoload_paths += [config.action_mailer.preview_path] | |
| routes.append do | |
| get '/rails/mailers' => "rails/mailers#index" | |
| get '/rails/mailers/*path' => "rails/mailers#preview" | |
| end |
| name: Deploy | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| build: |