Skip to content

Commit

Permalink
Merge pull request #140 from marcrohloff/remove-usage-of-spree-user
Browse files Browse the repository at this point in the history
Use Spree.user_class instead of Spree::User to allow for custom user classes
  • Loading branch information
aldesantis authored Jul 30, 2020
2 parents 1afd169 + 916ce43 commit dadc35a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/views/spree/admin/subscriptions/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<% if f.object.new_record? %>
<div class="field">
<%= f.label :user_id, I18n.t('spree.user'), class: "required" %>
<%= f.collection_select :user_id, Spree::User.all, :id, :email, {}, class: "select2 fullwidth" %>
<%= f.collection_select :user_id, Spree.user_class.all, :id, :email, {}, class: "select2 fullwidth" %>
</div>
<% end %>

Expand Down
2 changes: 1 addition & 1 deletion app/views/spree/admin/subscriptions/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<div class="row">
<div class="field-block col-4">
<div class="field">
<%= label_tag :q_user_email_cont, Spree::User.human_attribute_name(:email) %>
<%= label_tag :q_user_email_cont, Spree.user_class.human_attribute_name(:email) %>
<%= f.text_field :user_email_cont, size: 25 %>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion lib/solidus_subscriptions/processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def batched_users_to_be_processed
subscriptions = SolidusSubscriptions::Subscription.arel_table
installments = SolidusSubscriptions::Installment.arel_table

::Spree::User.
::Spree.user_class.
joins(:subscriptions).
joins(
subscriptions.
Expand Down

0 comments on commit dadc35a

Please sign in to comment.