Skip to content

Instantly share code, notes, and snippets.

View atstockland's full-sized avatar

Adam Stockland atstockland

View GitHub Profile
require 'test_helper'
describe AccountsController do
# class AccountsControllerTest < ActionDispatch::IntegrationTest
before do
user = users(:glenn)
sign_in(user)
end
@atstockland
atstockland / create two table headers
Last active January 1, 2016 01:59
Create a nested iteration that spans two table header rows. The idea is to have the upper row show the model aircraft, and then under that group show the school aircraft that are in that group.
<% @models.each_with_index do |m, index| %>
<th class="center-text model_column_span" colspan="<%= current_school.helicopters.active.joins{ helimodel }.where{ helimodel.nickname.eq( m ) }.order("helimodels.nickname asc").length %>"><%= m %></th>
<%= "(#{@models.length-1} - #{index}), " %>
<% if @models.length-1 == index %>
<%= "</tr> <tr>".html_safe %>
<% end %>
<th class="time">Time</th>
<div class="well top_box">
<h3>LESSON</h3>
<%= f.association :flightlesson %>
<div id="load_box">
<p id="gradable_items"></p>
<p id="scenarios"></p>
</div>
</div>
@atstockland
atstockland / heroku log
Created January 11, 2013 21:43
error setting up honeybadger on heroku
heroku logs (see line 34)
2013-01-11T21:14:34+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/railtie/configurable.rb:30:in `method_missing'
2013-01-11T21:14:34+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.3/lib/rack/builder.rb:51:in `instance_eval'
2013-01-11T21:14:34+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.3/lib/rack/builder.rb:51:in `initialize'
2013-01-11T21:14:34+00:00 app[web.1]: from config.ru:1:in `new'
2013-01-11T21:14:34+00:00 app[web.1]: from config.ru:1:in `<main>'
2013-01-11T21:14:34+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/initializable.rb:30:in `run'
2013-01-11T21:14:34+00:00 app[web.1]: from config.ru:3:in `require'
2013-01-11T21:14:34+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/rack/adapter/loader.rb:33:in `eval'