I hereby claim:
- I am onethirtyfive on github.
- I am onethirtyfive (https://keybase.io/onethirtyfive) on keybase.
- I have a public key whose fingerprint is AB42 5AB2 8DD7 9A67 27AA 2CFE FF30 B1CA 93CB 1225
To claim this, I am signing this object:
| Error: | |
| Scenario: Visiting landing page # features/landing.feature:5 | |
| Given I am on the landing page # features/step_definitions/web_steps.rb:15 | |
| undefined method `visit' for #<Cucumber::Rails::World:0x63cc072> (NoMethodError) | |
| ./features/step_definitions/web_steps.rb:15:in `/^(?:|I )am on (.+)$/' | |
| features/landing.feature:6:in `Given I am on the landing page' | |
| Then I should see a welcome message # features/landing.feature:7 | |
| From features/support/env.rb: |
| a typical, if short Rails 3.0 'rake routes' output for a resource defined in routes with 'resources :posts' | |
| [22:15][me@localhost:rails_project(master)]$ rake routes | |
| (in /home/me/Code/rails_project) | |
| GET /posts(.:format) {:controller=>"posts", :action=>"index"} | |
| posts POST /posts(.:format) {:controller=>"posts", :action=>"create"} | |
| new_post GET /posts/new(.:format) {:controller=>"posts", :action=>"new"} | |
| GET /posts/:id(.:format) {:controller=>"posts", :action=>"show"} | |
| PUT /posts/:id(.:format) {:controller=>"posts", :action=>"update"} | |
| post DELETE /posts/:id(.:format) {:controller=>"posts", :action=>"destroy"} |
| test: for #content_tag method should support tags with haml. (TestTagHelpers) [test/test_tag_helpers.rb:52]: | |
| expected following output to contain a <p class='test' id='test1'>Test 1</p> tag: | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> | |
| <style type="text/css"> | |
| body { text-align:center;font-family:helvetica,arial;font-size:22px; | |
| color:#888;margin:20px} | |
| #c {margin:0 auto;width:500px;text-align:left} |
| Here's the relevant part of the schema, simplified, showing relations: | |
| CREATE TABLE "units" ( | |
| "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, | |
| "name" VARCHAR(50) | |
| ); | |
| CREATE TABLE "champions" ( | |
| "unit_id" INTEGER NOT NULL, | |
| "title" VARCHAR(50), |
| # This example is an alternative to implementing polymorphic associations | |
| # using an ActiveRecord-esque 'type' column. In this model, there are many | |
| # 'units.' Unit is an abstract supertype. Descendants are modeled referencing | |
| # a unit by 'unit_id', a foreign key to the primary key in the units model. | |
| # Note: This approach maintains referential integrity in the database via | |
| # descendants' FK to unit.id; however, it is the application's responsibility | |
| # to ensure that no two descendants reference the same unit. This is an | |
| # intrinsic limitation of the "Class Table Inheritance" approach, but it's | |
| # a lot better than maintaining "type" data that is opaque to the data store. |
| source 'http://rubygems.org' | |
| RAILS_VERSION = '~> 3.1.0.rc4' | |
| DM_VERSION = '~> 1.1.0' | |
| RSPEC_VERSION = '~> 2.6.0' | |
| CUCUMBER_VERSION = '~> 1.0.0' | |
| gem 'activesupport', RAILS_VERSION, :require => 'active_support' | |
| gem 'actionpack', RAILS_VERSION, :require => 'action_pack' | |
| gem 'actionmailer', RAILS_VERSION, :require => 'action_mailer' |
| # lib/api/presenters/detailed_post.rb | |
| module API | |
| module Presenters | |
| class DetailedPost | |
| include ActiveModel::Serializers::JSON | |
| include ActiveModel::Serializers::Xml | |
| attr_accessor :post | |
| delegate :attributes, :to => :post |
| letters = ['a', 'b', 'c', 'd'] | |
| letters.each do |letter| | |
| puts letter | |
| end | |
| => prints each letter. easy. | |
| # below, '' is an empty string. | |
| # result_string is initially '', the argument passed to inject. |
| /* | |
| * Javascript provider idiom illustrated | |
| * @author Susan Potter | |
| * @date 2011-01-28 | |
| */ | |
| // FinEnv "interface" | |
| var FinEnv = function () { | |
| return { | |
| println: function (output) { |
I hereby claim:
To claim this, I am signing this object: