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
| # renders nothing | |
| <div data-hook="product_show"> | |
| <<h1>Hello World</h1> | |
| </div> | |
| # renders correctly | |
| <div data-hook="product_show"> | |
| <% @body_id = 'product-details' %> | |
| <h1>Hello World</h1> | |
| </div> |
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
| # renders nothing | |
| <div data-hook="product_show"> | |
| <h1>Hello World</h1> | |
| </div> | |
| # renders correctly | |
| <div data-hook="product_show"> | |
| <% @body_id = 'product-details' %> | |
| <h1>Hello World</h1> | |
| </div> |
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
| Started GET "/products/toughbook-19" for 127.0.0.1 at 2011-11-04 13:20:12 -0400 | |
| Processing by ProductsController#show as HTML | |
| Parameters: {"id"=>"toughbook-19"} | |
| [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1 | |
| [1m[36mProduct Load (0.2ms)[0m [1mSELECT "products".* FROM "products" WHERE "products"."permalink" = 'toughbook-19' LIMIT 1[0m | |
| [1m[35mVariant Load (0.2ms)[0m SELECT "variants".* FROM "variants" WHERE "variants"."product_id" = 1 AND (variants.deleted_at is null) | |
| [1m[36mSQL (0.2ms)[0m [1mSELECT "option_values".*, "t0"."variant_id" AS ar_association_key_name FROM "option_values" INNER JOIN "option_values_variants" "t0" ON "option_values"."id" = "t0"."option_value_id" WHERE "t0"."variant_id" IN (1)[0m | |
| [1m[35mImage Load (0.3ms)[0m SELECT "assets".* FROM "assets" WHERE "assets"."type" IN ('Image') AND "assets"."viewable_type" = 'Variant' AND "assets"."viewable_id" IN (1) ORDER BY position | |
| [1;32mDeface:[0m 1 overrides found for 'pr |
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
| Started GET "/products/toughbook-19" for 127.0.0.1 at 2011-11-04 13:26:59 -0400 | |
| Processing by ProductsController#show as HTML | |
| Parameters: {"id"=>"toughbook-19"} | |
| [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1[0m | |
| [1m[35mProduct Load (0.2ms)[0m SELECT "products".* FROM "products" WHERE "products"."permalink" = 'toughbook-19' LIMIT 1 | |
| [1m[36mVariant Load (0.2ms)[0m [1mSELECT "variants".* FROM "variants" WHERE "variants"."product_id" = 1 AND (variants.deleted_at is null)[0m | |
| [1m[35mSQL (0.2ms)[0m SELECT "option_values".*, "t0"."variant_id" AS ar_association_key_name FROM "option_values" INNER JOIN "option_values_variants" "t0" ON "option_values"."id" = "t0"."option_value_id" WHERE "t0"."variant_id" IN (1) | |
| [1m[36mImage Load (0.3ms)[0m [1mSELECT "assets".* FROM "assets" WHERE "assets"."type" IN ('Image') AND "assets"."viewable_type" = 'Variant' AND "assets"."viewable_id" IN (1) ORDER BY position[0m | |
| [1;32mDeface:[0m 1 overrides found |
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
| Started GET "/products/toughbook-19" for 127.0.0.1 at 2011-11-04 13:31:42 -0400 | |
| Processing by ProductsController#show as HTML | |
| Parameters: {"id"=>"toughbook-19"} | |
| User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1 | |
| Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."permalink" = 'toughbook-19' LIMIT 1 | |
| Variant Load (0.2ms) SELECT "variants".* FROM "variants" WHERE "variants"."product_id" = 1 AND (variants.deleted_at is null) | |
| SQL (0.3ms) SELECT "option_values".*, "t0"."variant_id" AS ar_association_key_name FROM "option_values" INNER JOIN "option_values_variants" "t0" ON "option_values"."id" = "t0"."option_value_id" WHERE "t0"."variant_id" IN (1) | |
| Image Load (0.3ms) SELECT "assets".* FROM "assets" WHERE "assets"."type" IN ('Image') AND "assets"."viewable_type" = 'Variant' AND "assets"."viewable_id" IN (1) ORDER BY position | |
| Deface: 1 overrides found for 'products/show' | |
| Deface: 'promo_product_properties' matched 0 times with '[data-hook='product_pr |
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
| def option_values | |
| option_values = [] | |
| model.variants.each do |variant| | |
| option_values << variant.option_values | |
| end | |
| option_values.flatten.uniq | |
| 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
| class ProductDecorator < ApplicationDecorator | |
| decorates :product | |
| # Gets all of the OptionValues that is used by a Variant of the Product | |
| # | |
| # Returns an Array of OptionValues | |
| def option_values | |
| option_values = [] | |
| model.variants.each do |variant| |
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 Human | |
| constructor: -> @isHungry = true | |
| eat: -> | |
| @isHungry = false | |
| console.log "NUM NUMS!" | |
| class Girl extends Human | |
| wine: -> console.log "You never buy me flowers!" | |
| sue = new Girl() |
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 Human | |
| constructor: -> @isHungry = true | |
| eat: -> | |
| @isHungry = false | |
| console.log "NUM NUMS!" | |
| class Girl extends Human | |
| wine: -> console.log "You never buy me flowers!" | |
| jessica = new Girl() |
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
| = form_tag product_path(@product), :method => 'get', :id => "variants_search", :remote => true do |