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

Clicking on Reports gives me errors #48

Open
dbbooke opened this issue Apr 6, 2018 · 3 comments
Open

Clicking on Reports gives me errors #48

dbbooke opened this issue Apr 6, 2018 · 3 comments

Comments

@dbbooke
Copy link

dbbooke commented Apr 6, 2018

ActionView::Template::Error (undefined method `earnings_admin_reports_url' for #<#Class:0x007faa92b205e0:0x007faa92b19f60>):
11:
12: <% @reports.each do |key, value| %>
13:
14: <%= link_to value[:name], send("#{key}_admin_reports_url".to_sym) %>
15: <%= value[:description] %>
16:
17: <% end %>

@dbbooke
Copy link
Author

dbbooke commented Apr 6, 2018

Here is another error

When clicking on stock movements I get the following error
'ActionView::Template::Error (undefined method `new_admin_stock_location_stock_movement_url' for #ActionDispatch::Routing::RoutesProxy:0x007f824e07a490
Did you mean? new_admin_stock_location_url):
41:


42: <%= render 'spree/admin/shared/no_objects_found',
43: resource: Spree::StockMovement,
44: new_resource_url: new_object_url %>
45:

46: <% end %>
47:
'

@dbbooke
Copy link
Author

dbbooke commented Apr 6, 2018

Better picture of error
screen shot 2018-04-06 at 12 01 03 am

@maximus242
Copy link

maximus242 commented Sep 25, 2018

Hi so the issue appears to be that the earnings_admin_reports_url is not being created. A workaround for this to get the view to show is to replace "#{key}_admin_reports_url" with "sales_total_admin_reports_url". This is not a complete solution, nor is it the best solution. You would have to hard code every new url. The likely reason is that inside reports controller :earnings is not being initialized as a method.

  def initialize
    super
    ReportsController.add_available_report!(:sales_total)

end

So the solution may be to add :earnings as an available report to reports controller

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

2 participants