Skip to content

Instantly share code, notes, and snippets.

@patelc75
patelc75 / gist:295290
Created February 5, 2010 00:00
halo_shipping no email
>> o.ship_email.is_a?(String)
=> true
>> UserMailer.deliver_signup_installation(o.ship_email,:exclude_senior_info)
=> #<TMail::Mail port=#<TMail::StringPort:id=0x15781ba8732c> bodyport=#<TMail::StringPort:id=0x15781ba7be14>>
>> UserMailer.deliver_signup_installation(o.bill_email,:exclude_senior_info)
=> #<TMail::Mail port=#<TMail::StringPort:id=0x15781ba1d328> bodyport=#<TMail::StringPort:id=0x15781ba180a8>>
>> o.ship_email
=> "halo_shipping@chirag.name"
>> o.bill_email
=> "halo_billing@chirag.name"
@patelc75
patelc75 / gist:295525
Created February 5, 2010 05:03
Exception notifier failure
Rendering /home/web/haloror/public/500.html (500 Error)
rendering section "request"
/!\ FAILSAFE /!\ Fri Feb 05 04:51:25 +0000 2010
Status: 500 Internal Server Error
ActionView::TemplateError (protected method `filter_parameters' called for #<MgmtQueriesController:0xb6c1c8a0>) on line #3 of vendor/plugins/exception_notification/views/exception_notifier/_request.rhtml:
1: * URL : <%= @request.protocol %><%= @host %><%= @request.request_uri %>
2: * IP address: <%= @request.env["HTTP_X_FORWARDED_FOR"] || @request.env["REMOTE_ADDR"] %>
3: * Parameters: <%= filter_sensitive_post_data_parameters(@request.parameters).inspect %>
@patelc75
patelc75 / sdev failure
Created February 5, 2010 06:07
sdev ActiveMerchant (production mode) error msg
ActionView::TemplateError (undefined method `success?' for nil:NilClass) on line #18 of orders/failure.html.erb:
15:
16: <hr />
17:
18: <div class="box <%= @subscription.success? ? 'back-green' : 'back-orange' %>">
19: <h3>Subscription charges (begins after 3 months from the date of purchase)</h3>
20: <p>
21: Message: <%= @subscription.message %>
@patelc75
patelc75 / gist:296357
Created February 5, 2010 23:05
Falls with null timestamps on idev
haloror=# select * from falls where timestamp is null;
id | user_id | timestamp | magnitude | device_id | timestamp_call_center | call_center_pending | timestamp_server
-------+---------+-----------+-----------+-----------+-----------------------+---------------------+-------------------------------
29073 | 44 | | 0 | | | t | 2010-02-03 06:55:03.132337+00
29074 | 44 | | 0 | | | t | 2010-02-03 06:55:03.264691+00
29075 | 44 | | 0 | | | t | 2010-02-03 06:55:03.321366+00
29076 | 44 | | 0 | | | t | 2010-02-03 06:55:03.372586+00
29077 | 44 | | 0 | | | t | 2010-02-04 00:58:02.184664+00
29078 | 44 | | 0 |
[web@sdev haloror]$ /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- action_dispatch (MissingSourceFile)
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /home/web/haloror/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:509:in `require'
from /home/web/haloror/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:354:in `new_constants_in'
from /home/web/haloror/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:509:in `require'
from /home/web/haloror/vendor/plugins/exception_notification/lib/exception_notifier.rb:1
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /home/web/haloror/vendor/rails/activerecord/lib/../.
Feature: Manage user_intakes
Background: Authenticated user
Given a user "test-user" exists with profile
And I am authenticated as "test-user" with password "12345"
Scenario: Submit new user_intake with billing same as user
Given the following groups:
| name |
| halo_group |
@patelc75
patelc75 / gist:303915
Created February 14, 2010 09:06
caregiver toggles for user intake form
haloror=# select * from caregivers_by_user_id(351);
roles_user_id | email_addr | user_id | pos | removed | active | phone | email | text | rel | key
---------------+--------------------+---------+-----+---------+--------+-------+-------+------+-----+-----
1002 | patelc75@yahoo.com | 232 | 1 | f | f | t | f | t | | t
(1 row)
haloror=#
@patelc75
patelc75 / gist:311445
Created February 22, 2010 20:16
HTML for online store form
<form action="/order/" class="form" id="form1" method="post">
<fieldset style="border: 2px solid ; padding: 10px;">
<legend>Pick a product</legend>
<table id="product_detail_box" width="100%">
<tbody><tr>
<td>
<table>
<tbody><tr>
<td><input checked="checked" id="product_complete" name="product" type="radio" value="complete"> <label for="product_complete">myHalo Complete</label> ($59/mo)</td>
Feature: Online (D)irect (T)o (C)ustomer store
In order sell Halo products online to direct customer
As an administrator
I want to provide a public online store to direct customers
Background: # features/online_dtc_store.feature:8
/Users/patelc75/Documents/code/haloror/app/controllers/sessions_controller.rb:47: warning: Object#id will be deprecated; use Object#object_id
Given I am guest # features/step_definitions/general_steps.rb:23
When I go to the online store # features/step_definitions/web_steps.rb:18
@patelc75
patelc75 / gist:316984
Created February 27, 2010 21:42
example cucumber for online store
# https://redmine.corp.halomonitor.com/issues/show/2558
#
Feature: Online (D)irect (T)o (C)ustomer store
In order sell Halo products online to direct customer
As an administrator
I want to provide a public online store to direct customers
Background:
Given I am guest
And the product catalog exists