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 is there nothing working in this gem? #235

Open
paul-mesnilgrente opened this issue Nov 18, 2021 · 2 comments
Open

Why is there nothing working in this gem? #235

paul-mesnilgrente opened this issue Nov 18, 2021 · 2 comments

Comments

@paul-mesnilgrente
Copy link

I'm trying some very simple stuff like:

entry.published_at_with_locales['en-NZ'] = DateTime.parse(data['published_at'])
# or even
entry.published_at_with_locales =   {'en-NZ' => DateTime.parse(data['published_at'])}

# no errors!

But it's not working, when I run

entry.published_at_with_locales
# gives nil!

How simple should this be?

@paul-mesnilgrente paul-mesnilgrente changed the title Why is there nothing in this gem? Why is there nothing working in this gem? Nov 18, 2021
@rubydog
Copy link
Collaborator

rubydog commented Nov 20, 2021

@paul-mesnilgrente As mentioned in documentation you need to save entry entry.save after updating it to reflect the changes.

Trying the following might resolve your issue.

entry.published_at_with_locales['en-NZ'] = DateTime.parse(data['published_at'])
entry.save

Let me know if the fix works.

Cheers

@paul-mesnilgrente
Copy link
Author

I tried that but the result is the same :/

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