views:

24

answers:

2

Hey there!

screenshot

I'm following a tutorial (book) about building rails apps but i ran into a problem and i can't figure how to solve it.

When i try to edit a product the page simply displays de code (with ruby code) and two question marks at the top. All the other views (create, show...) are correct so I can figure it out.

Any help? Thanks!!

A: 

Does your view file end with .erb.html?

Matt Briggs
.html.erb you mean)
neutrino
Yes it end with .html.erb (de file was generated by rails it self, not created by me; i just edited it with a line of embedded code)
jak3t
A: 

What -are- those two question marks? My guess is that since Rails can't parse it as an erb file, it just displays it as is.

Trevoke
That's the problem. They are "nothing" because i don't have any characters there or in any other file that could generate those questions marks.
jak3t
Well, when you open the file in textmate or whatever text editor, what do you see? Remove them. Mind you, you need a text editor that will open the file as-is, not some kind of word processor that will try to parse it.
Trevoke
Yes i'm using TextMate. The file looks perfect and all other files are build the same way. Even when displaying hidden characters, i get nothing but paragraphs.
jak3t
Try this: Open the file in textmate, copy the text, close the file. Delete it, then create a new one with the same name, and paste in what you copied.. Then try to load it again.
Trevoke
That worked! Simple as that ah? Any ideia why that happened? Thanks a lot
jak3t
It's what I said before - Rails couldn't parse the file so it displayed it instead. Who knows -why- that happened though. I blame you. :p
Trevoke
LOL ok thanks a lot!
jak3t