Skip to content

Instantly share code, notes, and snippets.

@changs
Created April 18, 2014 10:38
Show Gist options
  • Save changs/11036917 to your computer and use it in GitHub Desktop.
Save changs/11036917 to your computer and use it in GitHub Desktop.
diff --git a/app/controllers/shops_controller.rb b/app/controllers/shops_controller.rb
index dff3678..16d99e1 100644
--- a/app/controllers/shops_controller.rb
+++ b/app/controllers/shops_controller.rb
@@ -20,7 +20,7 @@ class ShopsController < ApplicationController
def show
respond_to do |format|
- format.json { render :json => ApiShop.find_by_id(params[:id], current_user.meez_name), :content_type => "application/json" }
+ format.json { render :json => ApiShop.find_by_id_and_gender(params[:id], params[:gender]), :content_type => "application/json" }
format.html { redirect_to meezmaker_path + "#/shop/#{params[:id]}" }
end
end
diff --git a/spec/acceptance/stories_spec.rb b/spec/acceptance/stories_spec.rb
index 4744eac..697cb51 100644
--- a/spec/acceptance/stories_spec.rb
+++ b/spec/acceptance/stories_spec.rb
@@ -63,9 +63,9 @@ feature "managing stories" do
label_name("image").should eq "Optional image"
label_name("remote_image_url").should eq "Optional remote image url"
click_link "Preview"
- #within(".preview_tab .previews") do
- # all(".preview").count.should eq 3 # only three items for this shop
- #end
+ within(".preview_tab .previews") do
+ all(".preview").count.should eq 3 # only three items for this shop
+ end
# banner story
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment