Skip to content

Instantly share code, notes, and snippets.

Mysql2::Error: Unknown column 'subscriptions.user_id' in 'where clause': SELECT `user`.* FROM `user` INNER JOIN `subscriptions` ON `user`.userid = `subscriptions`.subscriber_id WHERE ((`subscriptions`.user_id = 1))
ActiveRecord::StatementInvalid: Mysql2::Error: Unknown column 'subscriptions.user_id' in 'where clause': SELECT `user`.* FROM `user` INNER JOIN `subscriptions` ON `user`.userid = `subscriptions`.subscriber_id WHERE ((`subscriptions`.user_id = 1))
I'm wanting this to return all user records with the number of posts associated to each.
NoMethodError in Home#index
Showing /Volumes/Projects/dev/escalate/app/views/partials/layout/_sidebar.html.haml where line #1 raised:
undefined method `formats' for nil:NilClass
Extracted source (around line #1):
1: = render :action => 'widgets/new_members'
Trace of template inclusion: app/views/layouts/application.html.haml
<p></p>
@slant
slant / Gemfile
Created October 22, 2010 18:59
$ bundler install
gem "meta_where", :git => "git://github.com/ernie/meta_where.git"
source 'http://rubygems.org'
source 'http://gems.github.com'
gem 'sinatra'
gem 'haml'
gem 'fleakr'
@slant
slant / gist:599345
Created September 27, 2010 16:47 — forked from anonymous/gist:594093
unless existing_product.productcategorynames.nil?
existing_product.productcategorynames.split(',').each do |cn|
unless category_table[cn].nil?
category_name = category_table[cn]
tool.category = category_name unless tool.archived == 1
end
end
end
<!doctype html>
<html lang=en>
<head>
<title>Just a title</title>
</head>
<body>
<p>I can has HTML5?</p>
</body>
</html>
<!doctype html>
<title>Just a title</title>
<p>I can has HTML5?</p>