Permalink
Browse files

Replace all instances of current_user with current_spree_user

This is due to a change on spree_auth_devise which renamed this method

Fixes #16
  • Loading branch information...
radar committed May 16, 2013
1 parent 139ef5f commit ee036063e8aa9f742853be720ebbd4918089ca7f
@@ -13,7 +13,7 @@
<% end %>
<nav>
<%= link_to "products", products_path %>
- <% if current_user %>
+ <% if current_spree_user %>
<%= link_to t('my_account'), account_path, :class => "cart" %>
<%= link_to t('logout'), destroy_user_session_path, :class => "cart" %>
<% else %>
@@ -4,8 +4,8 @@
:name => "add_wishlists_to_account_my_orders",
:text => %q{<h3>
My Wishlists:
- <% if current_user.wishlists.present? %>
- <%= raw current_user.wishlists.map { |wl| link_to(wl.name, wl) }.join(", ") %>,&nbsp;
+ <% if current_spree_user.wishlists.present? %>
+ <%= raw current_spree_user.wishlists.map { |wl| link_to(wl.name, wl) }.join(", ") %>,&nbsp;
<% end %>
<%= link_to "Create New Wish List", new_wishlist_url %>
</h3>})
@@ -1,4 +1,4 @@
-<% if !current_user || !current_user.user_authentications %>
+<% if !current_spree_user || !current_spree_user.user_authentications %>
<div id="social_login">
<h2>Sign In Using</h2>
<p>If you have an existing account with any of the following sites you can login here by clicking on the icon below.</p>
@@ -3,7 +3,7 @@
<h1>Wish List - <%= @wishlist.name %><%= link_to "(edit)", "#", :id => "edit_wishlist_link" %></h1>
<div id="edit_wishlist">
- <% if @wishlist.user == current_user %>
+ <% if @wishlist.user == current_spree_user %>
<%= form_for @wishlist do |f| %>
<div>
<p><%= f.label :name, t(:name), :class => "inline" %>:&nbsp;<%= f.text_field :name %></p>
@@ -52,13 +52,13 @@
<%= link_to "Remove", wish, :method => :delete, :class => 'delete button' %>
</div>
- <% if current_user.wishlists.count > 1 %>
+ <% if current_spree_user.wishlists.count > 1 %>
<div class="move_item">
<%= link_to "Move", '#', :class => 'button' %>
<%= form_for wish do |f| %>
<label class="inline">Move to:</label>
- <%= f.select :wishlist_id, current_user.wishlists.map{|wl| [wl.name, wl.id] unless wl.id == @wishlist.id}.compact %>
+ <%= f.select :wishlist_id, current_spree_user.wishlists.map{|wl| [wl.name, wl.id] unless wl.id == @wishlist.id}.compact %>
<%= f.submit "Confirm" %>
<% end %>
</div>
@@ -75,7 +75,7 @@
<% end -%>
<p class="actions">
- <% if @wishlist.user == current_user %>
+ <% if @wishlist.user == current_spree_user %>
<%= link_to "Create New List", new_wishlist_path, :class => 'button' %> &nbsp;
<%= link_to "Delete This List", @wishlist, :method => :delete, :confirm => 'Are you sure, that you want to delete this wishlist?', :class => 'button checkout' %>
<% end -%>

0 comments on commit ee03606

Please sign in to comment.