Skip to content

Instantly share code, notes, and snippets.

View Mirai's full-sized avatar

Robert Miner Mirai

View GitHub Profile
@Mirai
Mirai / gist:3305614
Created August 9, 2012 16:23
Nested fields_for
_form.html.erb
<% form_for @estimate, :url => estimates_path do |f| %>
<div id="estimate_items">
<%= render :partial => "job_part", :collection => @estimate.job_parts %>
</div>
<%= add_job_part "Add Calendar" %>
<p><%= f.submit "ADD CALENDAR TO ESTIMATE" %></p>
<% end %>
Shell: /bin/zsh
Principal: (not logged in)
Host: localhost
Domain: (none)
Server name: acserver1.tukaiz.com
Port: 5050
DB Encoding: Unicode
ACCUREV_BIN: /Users/mirai/Applications/AccuRev/bin
Client time: 2012/05/17 10:00:06 CDT (1337266806)
Server time: 2012/05/17 10:00:06 CDT (1337266806)
BEGIN
DECLARE cursorEnd INT DEFAULT FALSE;
DECLARE clientID INT(11);
DECLARE clientStateAgentCode, tempStateAgentCode VARCHAR(255);
DECLARE clientClientID, tempClientID VARCHAR(255);
DECLARE clientNamePrefix, tempNamePrefix VARCHAR(255);
DECLARE clientFirstName, tempFirstName VARCHAR(255);
DECLARE clientMiddleName, tempMiddleName VARCHAR(255);
DECLARE clientLastName, tempLastName VARCHAR(255);
wq = WorkQueue.new(5)
i = 1
Dir.new(DIRECTORY).each do |file|
i2 = i
unless file.start_with?('.')
wq.enqueue_b do
move file to another directory
ImportFile.new(file, i2).run
end
module Namespace
class Address < ActiveRecord::Base
end
end
===
module Namespace
class MailingAddress < Address
set_type_field "Namespace::MailingAddress" # This is made up but is there something that accomplishes similar
PROMPT='%{$fg_bold[red]%}➜ %{$fg[cyan]%}%c $(git_prompt_info) % %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}["
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg_bold[blue]%}]"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}"