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

Why I have error when I trying override refinery/admin/images/_form.html.erb #3422

Open
ttmthanh opened this issue Jan 17, 2019 · 8 comments

Comments

@ttmthanh
Copy link

ttmthanh commented Jan 17, 2019

I want to add tooltips for image, so I rake override this file and change. Then i got error. I don't understand! Please help me...
image

@lanzhiheng
Copy link

lanzhiheng commented Jan 17, 2019

image

I have checked the routes, I think the image relevant helper does not contain the admin_image_crop_path, have you defined it? Or could you provide the routes information to me?

bin/rails routes | grep images

@ttmthanh
Copy link
Author

My routes does not contain the admin_image_crop_path. Why??? :(

@lanzhiheng
Copy link

In addition, I think the template engine which you are using is not ERB. Did you use other template engine syntax to rewrite the partial?

@ttmthanh
Copy link
Author

I'm using slim.

@lanzhiheng
Copy link

Why do you have admin_image_crop_path in the code ? I run

bin/rails refinery:override view=refinery/admin/images/_form

to rewrite the partial. But I just can get the ERB template, Not the same as yours. I also haven't the admin_image_crop_path in my partial. How did you do that ? 🤔

@lanzhiheng
Copy link

image

My fault. admin_image_crop_path was added recently. I am using the version 4.0.3 . So I can't get this template.

@lanzhiheng
Copy link

It is strange, You should have the admin_image_crop_path helper, because of this file https://github.com/refinery/refinerycms/blob/master/images/config/routes.rb.

I am not sure is it the preload cause this issue. Can you stop your server and run

bin/spring stop

after that restart your server and check it again ?

@ttmthanh
Copy link
Author

I will check it. Thanks.
And if i do not try override, i will not get error.
I just change _form.html.erb -> _form.html.slim and rewrite

@ttmthanh ttmthanh reopened this Jan 17, 2019
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