Skip to content

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

Open
@cchavez

Description

@cchavez

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions