Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoMethodError in Spree::Admin::Shipments#index #73

Open
nobicycle opened this issue Nov 14, 2015 · 6 comments
Open

NoMethodError in Spree::Admin::Shipments#index #73

nobicycle opened this issue Nov 14, 2015 · 6 comments

Comments

@nobicycle
Copy link

Hello.
Thanks for this extension.
Running Spree 3.04, all appears to install OK. The admin interface shows the new elements
Suppliers - OK, I can create them.
Configuration.Drop Ship Settings - OK I can change config.
Shipments - causes the error displayed below:

Regards

NoMethodError in Spree::Admin::Shipments#index

Showing /home/user/.bundler/ruby/2.2.0/spree_drop_ship-132e9c037ade/app/views/spree/admin/shipments/index.html.erb where line #39 raised:

undefined method `state_eq' for #Ransack::Search:0x007f7a8cba5190

Extracted source (around line #101):

99
100
101
102
103
104

    end
  else
    super
  end
end

Rails.root: /home/user/Projects/Toraja_Art_Craft
Application Trace | Framework Trace | Full Trace

ransack (1.4.1) lib/ransack/search.rb:101:in method_missing' actionview (4.2.2) lib/action_view/helpers/tags/base.rb:28:inpublic_send'
actionview (4.2.2) lib/action_view/helpers/tags/base.rb:28:in value' actionview (4.2.2) lib/action_view/helpers/tags/select.rb:16:inblock in render'
actionview (4.2.2) lib/action_view/helpers/tags/select.rb:16:in fetch' actionview (4.2.2) lib/action_view/helpers/tags/select.rb:16:inrender'
actionview (4.2.2) lib/action_view/helpers/form_options_helper.rb:163:in select' actionview (4.2.2) lib/action_view/helpers/form_options_helper.rb:777:inselect'
/home/user/.bundler/ruby/2.2.0/spree_drop_ship-132e9c037ade/app/views/spree/admin/shipments/index.html.erb:39:in block (2 levels) in _4b92abb4ca2e84a0dbbf6d82dcbeebc1' actionview (4.2.2) lib/action_view/helpers/capture_helper.rb:38:inblock in capture'
actionview (4.2.2) lib/action_view/helpers/capture_helper.rb:200:in with_output_buffer' actionview (4.2.2) lib/action_view/helpers/capture_helper.rb:38:incapture'

@fisherman818
Copy link

facing the same problem now. did you find the solution?

@nobicycle
Copy link
Author

Hi dennisluan
No, I didn't find the solution.
As an alternative, I looked at Wombat for integration of some shipment solution providers, but Wombat said they were not accepting new customers.

@illustriam
Copy link

Hey nobicycle and dennisluan:

The answer can be found here (scroll to the bottom): #71

I tried commenting out line 39 like suggested in the link provided and it worked for me.

Good luck

@fisherman818
Copy link

Hi @illustriam, I don't advise you do this, cause this is only a temporary solution. whenever you bundle update again, it will get overwritten. Maybe you want to comment the relevant lines at Spree_drop_ship source codes

@TheRPunkt
Copy link

Have the same issue... Somebody here to fix this?

@robwar
Copy link

robwar commented Feb 25, 2016

I put in a pull request to fix this issue here: #74 .

The "state" attribute on the shipping model was not ransackable, so adding the following line to your shipping model decorator fixes this issue:

self.whitelisted_ransackable_attributes = ['number', 'state']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants