ruby on rails - Unwanted {} appearing in app, which copies text from the Java script -


i total beginner programming, , following 1 month rails tutorials try , learn basics of ruby rails.

i seem have made mistake somewhere in code, {} appearing below header of pages in app. when log in, , java says "signed in successfully", text copied {} {:notice=>"signed in successfully."}.

you can see at

http://cryptic-sands-6348.herokuapp.com/

https://github.com/jackwatson/omrails/tree/master/app/views/layouts

i have checked through code in app>views>layouts , pages folders can not seem find mistake made.

if knows answer grateful :) , sorry n00b question

the issue on line #13 of app/views/layouts/application.html.erb.

change

<%= flash.each |name, msg| %> 

to

<% flash.each |name, msg| %> 

<%= ... %> outputs result of ruby code string, <% ... %> executes code.

you want execute ruby code, not display output of each, empty hash if there no errors.


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -