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

Version 0.22.x ActionView::Template::Error (unexpected token at '^D^HI"^Yaccounts_index_brief^F:^FET'): #1407

Open
cchavez opened this issue Dec 16, 2024 · 0 comments

Comments

@cchavez
Copy link

cchavez commented Dec 16, 2024

Hi all.

I have migrated to 0.22.x from 0.19.x.

I'm getting the following error:

ActionView::Template::Error (unexpected token at '^D^HI"^Yaccounts_index_brief^F:^FET'):
    16:       - else
    17:         = t(:added_ago, value: timeago(account.created_at)).html_safe
    18: 
    19:     - unless current_user.preference[:accounts_index_view] == "accounts_index_brief"
    20:       %dt
    21:         = link_to(account.website, account.website.to_url) + " | " if account.website.present?
    22:         = link_to_email(account.email) + " | " if account.email.present?
  
app/models/users/preference.rb:31:in `[]'
app/views/home/_account.html.haml:19
app/views/home/index.html.haml:26
app/controllers/home_controller.rb:18:in `index'

As far I know that value is on the table preferences and is coded in base64.

I reviewed the backup and the value seems to be the same that before the migration but now is failing with that error.

I reviewed the code and before this was the code:

Marshal.load(Base64.decode64(pref.value))

Now is:

JSON.parse(Base64.decode64(pref.value), symbolize_name: true)

any idea about this?

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

1 participant