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

Unable to autoload constant Sync::RefetchesController #235

Open
jgoodall628 opened this issue Sep 13, 2016 · 5 comments
Open

Unable to autoload constant Sync::RefetchesController #235

jgoodall628 opened this issue Sep 13, 2016 · 5 comments

Comments

@jgoodall628
Copy link

Just trying to do a simple refetch, and I am getting this error.

<%= sync_new partial: "message_row", resource: Message.new, refetch: true %>

my partial is located at sync/messages/refetch/_message_row.html.erb

I am not super familiar with the code base but at first glance it looks like the routes were not updated to match the new render_sync namespace

@echan00
Copy link

echan00 commented Nov 8, 2016

Same here, running into the same problem

@zuyderleven
Copy link

Same problem, but solved it by merging some different branches in my master. https://github.com/zuyderleven/render_sync

@PENGZhaoqing
Copy link

same problem +1

@PENGZhaoqing
Copy link

get hint form @zuyderleven

create file in controller in sync/refetches_controller.rb and put in the code from official refetches_controller

And remember to modify the RenderSync::RefetchesController to Sync::RefetchesController, like this:

class Sync::RefetchesController < ApplicationController
...
end

@fabiosammy
Copy link

Maybe, MAYBE, is the "rails mess", about the folders order.
In the config/routes.rb we have:

Rails.application.routes.draw do
  get 'sync/refetch', controller: 'sync/refetches', action: 'show'
end

An the controller is locate in: app/controllers/sync/refetches_controller.rb, but the controller class is class RenderSync::RefetchesController < ApplicationController.

So, we need a PR to fix the folders name, or the class name(it's more simple). What's better?

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