- build-essential
- libxml2
- libxml2-dev (for nokogiri)
- libreadline6
25/08/2014 15:41:10.000 kernel[0]: exec of /Users/andrew/Library/Containers/com.todoist.mac.Todoist/Data/Library/Application Support/Todoist/.Sparkle/Autoupdate.app/Contents/MacOS/Autoupdate denied since it was quarantined by Todoist and created without user consent, qtn-flags was 0x00000006 | |
25/08/2014 15:41:10.659 Todoist[83762]: Couldn't posix_spawn: error 1 | |
25/08/2014 15:41:10.669 Todoist[83762]: ( | |
0 CoreFoundation 0x00007fff918fb25c __exceptionPreprocess + 172 | |
1 libobjc.A.dylib 0x00007fff937c2e75 objc_exception_throw + 43 | |
2 CoreFoundation 0x00007fff918fb10c +[NSException raise:format:] + 204 | |
3 Foundation 0x00007fff9482efb4 -[NSConcreteTask launchWithDictionary:] + 3167 | |
4 Foundation 0x00007fff9482dd58 +[NSTask launchedTaskWithLaunchPath:arguments:] + 200 | |
5 Sparkle 0x00000001089d9c6e -[SUBasicUpdateDriver installWithToolAndRelaunch:displayingUserInterf |
class User | |
has_many :products | |
def root? | |
id == 1 | |
end | |
def products_with_root | |
if root? | |
Product # Better way? |
conds = {:name => params[:name], :cas_number => params[:cas_number]}.reject {|k,v| v.nil? } | |
conds = conds.inject([[]]) {|h,(k,v)| h.first << "#{k} LIKE ?"; h << "%#{v}%"; h } | |
conds[0] = conds[0].join(' AND ') | |
ingredients = Ingredient.find(:all, :conditions => conds) |
# Rails Monkey Patch for fields_for with nested attributes. | |
# Allows an array to be supplied to a nested fields_for call instead | |
# of just a single object. | |
module ActionView | |
module Helpers | |
class FormBuilder | |
def fields_for_with_nested_attributes(association_name, args, block) | |
name = "#{object_name}[#{association_name}_attributes]" | |
obj_arg = args.first |
diff --git a/lib/ruport/acts_as_reportable.rb b/lib/ruport/acts_as_reportable.rb | |
index cdcafe9..30db614 100644 | |
--- a/lib/ruport/acts_as_reportable.rb | |
+++ b/lib/ruport/acts_as_reportable.rb | |
@@ -344,13 +344,8 @@ module Ruport | |
new_columns = [] | |
associations.each do |association| | |
- if include_has_options | |
- assoc_options = includes[association].merge({ |
# Given an articles table with a title column | |
class Article < ActiveRecord::Base | |
column_defaults["title"] = "Blank" | |
end | |
assert_equals Article.new.title, "Blank" |
Dear Andrew, | |
Thank you for your enquiry. | |
Sport England still maintain the Active Places database , however the | |
website has not had any money spent on it for a number of years and is | |
being superseded by Spogo https://spogo.co.uk/ . We are working with | |
the FIA on the development of this with an initial one year pilot. |
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
for (var i = 0; i < 3; i++) { |
44) User previous_visit_at first time another call right after still has no value | |
Failure/Error: let(:user) { Fabricate(:user) } | |
NoMethodError: | |
undefined method `first' for nil:NilClass | |
# ./lib/pretty_text.rb:122:in `block in markdown' | |
# <internal:prelude>:10:in `synchronize' | |
# ./lib/pretty_text.rb:119:in `markdown' | |
# ./lib/pretty_text.rb:175:in `cook' | |
# ./app/models/user.rb:424:in `cook' | |
# /home/andrew/.rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:429:in `_run__4302418198468556500__save__3765986560144774874__callbacks' |