Rails 4 fomatting with slim error -
I have this simple ARB code that works perfectly, my i18n.yml Combined for file. This idea is to get the customer's
edit.html.erb page, get the title of the page in my
en.yml file, and enter that title with the
@client pass .fullname variable such as:
& lt; H1 & gt; & Lt;% = t ('client.edit.title') ,: current_client = & gt; @ client.fullname% & gt; & Lt; / H1> Now, if I am in the process of translating my ARB files into thin then the result of that line of code
h1 = t ('client' Edit.title '),: current_client = & gt; @ client.fullname but pass this will to the en.yml file instead, it throws this error:
/app/views/clients/edit.html.slim:1: Syntax Error, Unexpected ',', Expected '' '... tty2 = (T (' client.edit.title '),: current_client = & Gt; @ client.f ... ... Can anyone know what I'm doing wrong here? <
The hash parameter option method must be passed within the call field, such as
h1 = t ('client.edit.title' ,: Current_client = & gt; @ client.fulln ame) It is not certain why this will work in the ERB, but this'
you can completely remove the bracket
h1 = t 'client.edit.title' ,: current_client = & gt; @ client.fullname
Comments
Post a Comment