-
Notifications
You must be signed in to change notification settings - Fork 251
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
Friendly urls are not generated on save #485
Comments
I found some documentation around this: http://blog.toshima.ru/2017/04/06/saved-change-to-attribute.html which says that We updated this in #480 as this version of Refinery specifically targets Rails 5.1.x I wonder what could be going wrong? |
Sorry for my late response. I have changed with will_save_change_to_attribute - post.rb - and it seems to be working fine: Couldn't run tests and didn't had time to figure out how can setup al refinerycms in dev mode. If you have some documentation about what do I need setup in a dev env, I will be happy to contribute. Best |
Hi Ionut, thank you! Does this guide help you? https://www.refinerycms.com/guides/contributing-to-refinery |
Yes, I should have seen it :) I'll make a PR on this issue after I will have the dev + test mode running. Best |
Hi, this little change solved friendly URL me too.
to
|
Hi @spotlessicode, could you provide a pull request with a test? |
Hi @bricesanchez I tried, but after several hours, I couldn't set forked and cloned refinerycms-blog in local. |
It doesn' work if you change something in the post, but not the title, it just goes back to the blog/post/1 url instead of the friendly one. So you have to add a space or something at the and of the title if you edit a post and save with that title changes. so better to use body as well:
|
Hi,
It seems that post's slug is not generated when save/update.
I'm using
gem 'refinerycms', '~> 4.0'
gem 'refinerycms-blog', git: 'https://github.com/refinery/refinerycms-blog', branch: 'master'
It might be that this one returns always false:
I had forced this method to always return false and the slug/friendly_id is generated. So it might be that those attributes are not seen as saved.
I have changed to
attribute_changed?(:custom_url) || attribute_changed?(:title)
and it returns correctly the state of attribute changes. I wonder if is not a Rails 5.1 issue?
thank you
Ionut
The text was updated successfully, but these errors were encountered: