This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'test_helper' | |
| require 'rails/generators/test_case' | |
| require 'active_support/core_ext/object/to_json' | |
| require 'generators/party_foul/install_generator' | |
| class InstallGeneratorTest < Rails::Generators::TestCase | |
| tests PartyFoul::InstallGenerator | |
| destination File.expand_path('../tmp', File.dirname(__FILE__)) | |
| setup :prepare_destination |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --type-add | |
| ruby=.haml | |
| --type-add | |
| css=.scss,.sass | |
| --type-set | |
| coffee=.hamlc,.coffee | |
| --ignore-dir=log/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| coffee-rails (3.2.2) | |
| coffee-script (>= 2.2.0) | |
| railties (~> 3.2.0) | |
| coffee-rails-source-maps (1.0.0) | |
| coffee-script-source (>= 1.6.1) | |
| coffee-script (2.2.0) | |
| coffee-script-source | |
| execjs | |
| coffee-script-source (1.6.1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --type-add | |
| ruby=.haml | |
| --type-add | |
| css=.scss,.sass | |
| --type-set | |
| coffee=.hamlc,.coffee | |
| --ignore-dir=log/ | |
| --color |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| irb(main):001:0> Something.where.any(stuff: 1) | |
| ArgumentError: tried to create Proc object without a block | |
| from /Users/dan/.rbenv/versions/1.9.3-p286/lib/ruby/gems/1.9.1/bundler/gems/squeel-c232bf9ea924/lib/squeel/adapters/active_record/relation_extensions.rb:222:in `new' | |
| from /Users/dan/.rbenv/versions/1.9.3-p286/lib/ruby/gems/1.9.1/bundler/gems/squeel-c232bf9ea924/lib/squeel/adapters/active_record/relation_extensions.rb:222:in `where' | |
| from /Users/dan/.rbenv/versions/1.9.3-p286/lib/ruby/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/querying.rb:9:in `where' | |
| from (irb):1 | |
| from /Users/dan/.rbenv/versions/1.9.3-p286/lib/ruby/gems/1.9.1/gems/railties-3.2.13/lib/rails/commands/console.rb:47:in `start' | |
| from /Users/dan/.rbenv/versions/1.9.3-p286/lib/ruby/gems/1.9.1/gems/railties-3.2.13/lib/rails/commands/console.rb:8:in `start' | |
| from /Users/dan/.rbenv/versions/1.9.3-p286/lib/ruby/gems/1.9.1/gems/railties-3.2.13/lib/rails/commands.rb:41:in `<top (required)> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| E/Users/dan/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/actionpack-3.2.13/lib/abstract_controller/helpers.rb:153:in `include': wrong argument type Class (expected Module) (TypeError) | |
| from /Users/dan/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/actionpack-3.2.13/lib/abstract_controller/helpers.rb:153:in `block in add_template_helper' | |
| from /Users/dan/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/actionpack-3.2.13/lib/abstract_controller/helpers.rb:153:in `module_eval' | |
| from /Users/dan/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/actionpack-3.2.13/lib/abstract_controller/helpers.rb:153:in `add_template_helper' | |
| from /Users/dan/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/actionpack-3.2.13/lib/abstract_controller/helpers.rb:96:in `block in helper' | |
| from /Users/dan/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/actionpack-3.2.13/lib/abstract_controller/helpers.rb:95:in `each' | |
| from /Users/dan/.rbenv/versions/2.0.0-p247/lib/ruby/gem |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Parent < ActiveRecord::Base | |
| #parent has an array column that stores the integers of child records | |
| def child_records | |
| self.class.where(id: child_record_ids) | |
| end | |
| def child_records=(children) | |
| self.child_record_ids = children.map(&:id) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "Version": "2008-10-17", | |
| "Statement": [ | |
| { | |
| "Effect": "Allow", | |
| "Action": ["s3:*"], | |
| "Resource": ["arn:aws:s3:::<bucketname>/*"] | |
| } | |
| ] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Person < ActiveRecord::Base | |
| has_many :post_tags, class_name: 'Tag' | |
| end | |
| # Migration | |
| create_table :person do |t| | |
| t.timestamps | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| unless File.exist?('Gemfile') | |
| File.write('Gemfile', <<-GEMFILE) | |
| source 'https://rubygems.org' | |
| gem 'rails', github: 'rails/rails' | |
| gem 'arel', github: 'rails/arel' | |
| gem 'sqlite3' | |
| GEMFILE | |
| system 'bundle' | |
| end |