Questions tagged [spree-auth-devise]

68 questions
1
vote
1 answer

Can I add a `after_add` callback to a ruby association in a model decorator?

The association is has_and_belongs_to_many and is defined in a gem. I need to know when a new one is added so from what I can tell the answer is the after_add callback, but I can't figure out how to add this after the fact. Code I have now that…
1
vote
1 answer

Spree Allow admin login with different roles added in user

In my Spree Application i have created new role having name sales_rep and i want to give admin access to users having this role. Here you can find my cancan ability file: module Spree class SalesRepAbility include CanCan::Ability def…
1
vote
1 answer

Rails and Devise Missing link to host

I am very confused with how to provide the default_url_options. I am getting this error Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true I am using spreecommerce which uses…
Sam M
  • 640
  • 1
  • 8
  • 18
1
vote
0 answers

Testing with dependencies from other gem

I want to add functionality to the default User model from the solidus_auth_devise gem and I want to write a test for it in Rspec. However, when I try to instantiate a model with Spree::User.new, I would get uninitialized constant Spree What do I…
harinsa
  • 3,176
  • 5
  • 33
  • 53
1
vote
1 answer

Error occurred while parsing request parameters JSON::ParserError - 795: unexpected token at

I am trying to write the API methods for user to sign up on spree app. It's working properly on my local machine but not on server. here is my code of user_decorator_controller.rb def sign_up @user =…
Mahi L
  • 75
  • 1
  • 5
1
vote
1 answer

Facing issue in installing spree_auth_devise in rails '4.2.4'

As I am new in spree in my gem file I have included gem 'spree' gem 'spree_auth_devise' and run bundle install I get error: Bundler could not find compatible versions for gem "railties": In Gemfile: spree_auth_devise (>= 0) ruby depends…
user123
  • 163
  • 1
  • 14
1
vote
1 answer

NoMethodError in Spree::Admin::Societies#new undefined method `societies_path'

I am new to spree and ruby on rails. while creating a custom controller in my spree app, I can successfully add link to it in spree admin panel using deface. but when I go to that link, it gives me following error NoMethodError in…
1
vote
1 answer

Spree generic implementation for api token

I an deleting items from spree cart using the following spree api url /api/orders/#{current_order.number}/line_items/#{line_iem.id}?line_item[variant_id]=#{line_item.variant.id}&line_item[quantity]=0&token=MyToken the token used here is of a single…
Aitizazk
  • 332
  • 1
  • 4
  • 16
1
vote
2 answers

Custom Spree Devise Registration - Admin Authorization Failure

I have added name, surname and birthdate fields to devise registration. Here is the link to my original question. Adding name to Spree Devise registration It seems that on the frontend side everything works. However I now get an Authorization…
1
vote
1 answer

What is the use of guest_token in spree or rails while using Devise

I am using spree to build my e-commerce application .It uses Devise gem for authentication. Every time an order is created a random guest_token is associated with it .In my application I used a functionality where I associate order with email while…
1
vote
1 answer

install spree backend in a separate extension or engine

I am running into a complicated case using spree. I have a components-based rails app with 3 spree engines or extensions: my_core: contains spree and auth_spree models + my own extra models my_api: contains the api for my app (totally different…
Moh
  • 249
  • 3
  • 15
1
vote
1 answer

Spree admin only accounts

I am trying to setup spree commerce with API and backend only. I can get the site to start properly and I can login with the admin credentials, but if I click to view my account via the header menu I get the following…
vosmith
  • 4,948
  • 2
  • 18
  • 26
0
votes
0 answers

LoadError in Spree::Admin::OrdersController#index Unable to autoload constant Spree::Order::Checkout

Getting this error going to /admin/orders of a mounted Spree install. The file, in fact, defines that class. I'm getting this error while installing spree, this version has not yet worked on my setup. A related SO question is: Spree commerce:…
Victor Pudeyev
  • 4,296
  • 6
  • 41
  • 67
0
votes
0 answers

Spree commerce: wrong argument type Class (expected Module) [ include Metadata ]

I'm following these two tutorials to wire spree into an exsting app: https://dev-docs.spreecommerce.org/advanced/existing_app_tutorial#use-your-existing-authentication https://dev-docs.spreecommerce.org/customization/authentication In my routes, I…
Victor Pudeyev
  • 4,296
  • 6
  • 41
  • 67