Skip to content

Instantly share code, notes, and snippets.

View byrnejb's full-sized avatar

James B. Byrne byrnejb

View GitHub Profile
@byrnejb
byrnejb / gist:637362
Created October 20, 2010 21:25
email_spec 1.0.0 cannot find message body
puts(current_email.inspect)
puts(current_email.body.inspect)
puts(current_email.default_part_body.inspect)
gives this
#<Mail::Message:23964830397760, Multipart: false, Headers: <Date: Wed, 20 Oct 2010 17:06:05 -0400>, <From: xxx@harte-lyne.ca>, <Reply-To: xxx@harte-lyne.ca>, <To: xxx@harte-lyne.ca>, <Message-ID: <4cbf59bd14438_57b715cbbc8841ac969b@inet05.hamilton.harte-lyne.ca.mail>>, <Subject: [ForEx] 2010-10-20 - Foreign Exchange Rates Central Bank Update Notice>, <Mime-Version: 1.0>, <Content-Type: text/plain>, <Content-Transfer-Encoding: 7bit>>
#<Mail::Body:0x2b977e67c758 @charset="US-ASCII", @part_sort_order=["text/plain", "text/enriched", "text/html"], @parts=[], @raw_source="", @epilogue=nil, @preamble=nil, @encoding="7bit", @boundary=nil>
@byrnejb
byrnejb / gist:636670
Created October 20, 2010 15:47
Rails-3.0.0
rails3]$ cucumber -pp features/app/models/identifiers/identifier.feature:22
Using the p profile...
Using AdapterExtensions
# A Correspondent is a model of anything that has
# separate legal existance and standing for
# the purposes of contract law
#
# An Identitier is a model of anything that identifies
# a particular correspondent, even if not uniquely.
Feature: Save and find an Correspondent's various identifiers
@byrnejb
byrnejb / gist:636654
Created October 20, 2010 15:39
Rails-2.3.10
$ cucumber -p p features/app/models/identifiers/identifier.feature:22
Using the p profile...
Using AdapterExtensions
# A Correspondent is a model of anything that has
# separate legal existance and standing for
# the purposes of contract law
#
# An Identitier is a model of anything that identifies
# a particular correspondent, even if not uniquely.
Feature: Save and find an Correspondent's various identifiers
@byrnejb
byrnejb / gist:635479
Created October 20, 2010 00:10
new.html.erb with tattler
<!-- TEMPLATE: /home/byrnejb/Software/Development/Projects/proforma.rails3/app/views/layouts/application.html.erb -->
<!-- section from layouts/application.html.erb -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
@byrnejb
byrnejb / gist:635423
Created October 19, 2010 23:40
_role_header.html.erb
<%- fields_for(role_header) do |ff| -%>
<div class="roles" id="roles_header">
<fieldset style=".role_header label {display:block;}">
<legend><em> role Header </em></legend>
<p>
<b>
<%= label role_header.class.to_s.downcase,
:rolename,
:'Role Name: ',
@byrnejb
byrnejb / gist:635417
Created October 19, 2010 23:37
tattler clone backtrace
Given I visit the role creation page # features/app/models/roles/step_definitions/role_steps.rb:57
undefined method `errors' for nil:NilClass (ActionView::Template::Error)
/home/byrnejb/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-3.0.1/lib/active_support/whiny_nil.rb:48:in `method_missing'
./app/views/roles/new.html.erb:7:in `_app_views_roles_new_html_erb__1393793839_23534854623520_0'
/home/byrnejb/.rvm/gems/ruby-1.8.7-p302/gems/actionpack-3.0.1/lib/action_view/template.rb:135:in `send'
/home/byrnejb/.rvm/gems/ruby-1.8.7-p302/gems/actionpack-3.0.1/lib/action_view/template.rb:135:in `render_without_comment'
/home/byrnejb/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-3.0.1/lib/active_support/notifications.rb:52:in `instrument'
/home/byrnejb/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-3.0.1/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/home/byrnejb/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-3.0.1/lib/active_support