adduser deploy
ssh-copy-id -i ~/.ssh/deploy.pub [email protected]
aptitude install git
adduser deploy
ssh-copy-id -i ~/.ssh/deploy.pub [email protected]
aptitude install git
sudo su
class Log < ActiveRecord::Base | |
self.table_name = "versions" | |
has_one :previous_log, :class_name => "Log", | |
:order => "created_at DESC", | |
:conditions => proc{ "item_type = #{self.item_type}" } | |
end | |
=> NoMethodError: undefined method `item_type' for #<Class:0x7f9f5200c5f0> |
<%= form_for(@project) do |f| %> | |
<% if f.errors.any? %> | |
<div id='error_explanation'> | |
<h2><%= pluralize(f.errors.count, 'error') %> | |
prohibited this foo from being saved:</h2> | |
<ul> | |
<% f.errors.full_messages.each do |msg| %> | |
<li><%= msg %></li> | |
<% end %> | |
</ul> |
class PerspectivesController < ApplicationController | |
# GET /perspectives | |
# GET /perspectives.json | |
def index | |
@perspectives = Perspective.all | |
unless params['perspective'] | |
@perspective = @perspectives.where(default: true).first || Perspective.new | |
else | |
@perspective = Perspective.new | |
end |
source 'http://rubygems.org' | |
# source 'http://localhost:9292' | |
gemspec | |
group :test do | |
gem "simplecov", :require => false | |
gem "shoulda-matchers" | |
gem "shoulda-context" | |
gem "capybara-screenshot" |
def create_report | |
if @inspection.type == 'RoutineInspection' | |
puts "---CR> CREATING ROUTINE INSPECTION REPORT" | |
pdf = routine_inspection_generic | |
else | |
puts "---CR> CREATING INGOING INSPECTION REPORT" | |
thread = Thread.new do | |
pdf = ingoing_inspection_nsw | |
end.join | |
end |
def get_model_name(item) | |
item.class.to_s == Car.to_s ? item.content.class.to_s : item.class.to_s | |
end |
module ApplicationHelper | |
def cp(*paths) | |
paths.each do |path| | |
#do something | |
end | |
end | |
end |