Skip to content

Instantly share code, notes, and snippets.

constraints :subdomain => "admin" do
resources :badges, :controller => "badge_types", :as => :badge_types, :except => :destroy
end
constraints(:id => /[0-9]+/) do
resources :badges, :controller => "badge_types", :as => :badge_types, :only => [:index, :show]
end
rake db:migrate
== CreateCopywritings: migrating =============================================
-- create_table(:copywriting_phrases)
-> 0.0014s
-- add_index(:copywriting_phrases, :name, :scope)
rake aborted!
An error has occurred, this and all later migrations canceled:
SQLite3::SQLException: near "scope": syntax error: CREATE scope INDEX "index_copywriting_phrases_on_name" ON "copywriting_phrases" ("name")
6/1/11 13:15:46 [0x0-0x91091].com.apple.appstore[1476] Wed Jun 1 13:15:46 cl146.lan.betterbe.com App Store[1476] <Error>: CGBitmapContextGetBitsPerComponent: invalid context 0x10034e280
6/1/11 13:15:46 [0x0-0x91091].com.apple.appstore[1476] This isn't a bitmap context. Forcing destination format to ARGB_8 for CGContext.
6/1/11 13:16:05 [0x0-0x91091].com.apple.appstore[1476] Wed Jun 1 13:16:05 cl146.lan.betterbe.com App Store[1476] <Error>: CGBitmapContextGetBitsPerComponent: invalid context 0x10034e280
6/1/11 13:16:05 [0x0-0x91091].com.apple.appstore[1476] This isn't a bitmap context. Forcing destination format to ARGB_8 for CGContext.
6/1/11 13:16:16 [0x0-0x91091].com.apple.appstore[1476] Wed Jun 1 13:16:16 cl146.lan.betterbe.com App Store[1476] <Error>: CGBitmapContextGetBitsPerComponent: invalid context 0x10034e280
6/1/11 13:16:16 [0x0-0x91091].com.apple.appstore[1476] This isn't a bitmap context. Forcing destination format to ARGB_8 for CGContext.
6/1/11 13:16:16 [0x0-0x91091].com.apple.appstore
Resolved:
Then /^I should see a simple walkthrough with (\d+) steps$/ do |count|
steps = page.all(:css, 'div.walkthrough li.card').should have(count.to_i).things
end
Problem:
Then /^I should see a simple walkthrough with (\d+) steps$/ do |count|
page.all(:css, 'div.walkthrough li.card').count should == count.to_i
Jun 29 22:42:44 unknown com.apple.mobile.lockdown[19] <Notice>: Could not receive size of message
Jun 29 22:42:44 unknown lockdownd[19] <Error>: 011bd000 handle_connection: Could not receive USB message #6 from MDCrashReportTool. Killing connection
Jun 29 22:42:44 unknown lockdownd[19] <Error>: 011bd000 handle_connection: Could not receive USB message #8 from MDCrashReportTool. Killing connection
Jun 29 22:42:45 unknown com.apple.mobile.lockdown[19] <Notice>: Could not receive size of message
Jun 29 22:43:25 unknown com.apple.mobile.lockdown[19] <Notice>: Could not receive size of message
Jun 29 22:43:25 unknown lockdownd[19] <Error>: 2feff000 handle_connection: Could not receive USB message #5 from Xcode. Killing connection
Jun 29 22:43:26 unknown com.apple.mobile.lockdown[19] <Notice>: Could not receive size of message
Jun 29 22:43:26 unknown lockdownd[19] <Error>: 2feff000 handle_connection: Could not receive USB message #7 from Xcode. Killing connection
Jun 29 22:43:26 unknown com.apple.mobile.lockdown[19
rake routes result:
new_partner_session GET /sign_in(.:format) {:subdomain=>"partners", :controller=>"partners/sessions", :action=>"new"}
features/support/paths.rb:
when /partner login/
new_partner_session_path
@johanb
johanb / Gemfile
Created August 4, 2011 09:37
Rails 3.1.rc5 on Heroku Cedar
source 'http://rubygems.org'
gem 'rails', '3.1.0.rc5'
group :assets do
gem 'sass-rails', "~> 3.1.0.rc"
gem 'coffee-rails', "~> 3.1.0.rc"
gem 'uglifier'
#gem 'sprockets', :git => 'git://github.com/sstephenson/sprockets.git'
end
if (history && history.pushState) {
jQuery(function() {
$("#spots th a, body.admin #spots .pagination a, #partners th a, body.admin #partners .pagination a").live('click', function(e) {
$.getScript(this.href);
history.pushState(null, document.title, this.href);
return e.preventDefault();
});
$("#spots_search").submit(function() {
$.get(this.action, $("#spots_search").serialize(), null, "script");
return history.replaceState(null, document.title, $("#spots_search").attr("action") + "?" + $("#spots_search").serialize());
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js" type="text/javascript" charset="utf-8"></script>
<title>Test</title>
</head>
<body>
<p>Date: <input type="text" id="datepicker">&nbsp;<input type="text" id="alternate" size="30"/></p>
<a id="querylink" href="http://localhost:3000/?boardingtype=HP&departureairport=BRU&departuredate=2011-12-05&duration=11-16#">Blaat</a>
# POST /game_entries.json
def create
@game_entry = GameEntry.new(JSON.parse(params["entry"]))
respond_to do |format|
if @game_entry.save
format.json { render :json => { :status => true, :content => @game_entry } }
else
end
end