Help in deleting data from database

Hey

In section 5.13 of getting started with rails it shows how to delete
data
from the database. When i added the code i got this error. I have
checked
my code and cant find any problems. Help Please

On 29 September 2014 08:11, Aspiring.Student.programmer
[email protected] wrote:

Hey

In section 5.13 of getting started with rails it shows how to delete data
from the database. When i added the code i got this error. I have checked my
code and cant find any problems. Help Please

<img src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAABVYAAA…

You say it is an error but it does not look like an error message, it
looks like some html generated by an image_tag or similar. Show us
the line in your view that is generating that. If it is not coming
from a line in your view what do you see in development.log when it
happens?

Colin

I’d guess that He wanted to Show us a screenshot of the actual
errormessage
but his MUA got the HTML-mail wrong. Or our MUA does not support that
kind
of embedded images. Since I’m with my mobile right now I can’t check the
OPs mailheaders for misinformation.
Am 29.09.2014 10:17 schrieb “Colin L.” [email protected]:

Interesting… I saw his image just fine (it says Couldn’t find article
with id=‘5’ incidentally).

I am on Mac OS X Mail client.

[email protected] — Yes, Colin is right, you do not need to take a
screenshot of the error message, generally we prefer that you copy &
paste the text of the error message itself. (You can also paste code,
error messages, or stacktraces into http://gist.github.com click
“Create Private Gist” and then provide us with the URL that Gist creates
for that)

As far as your original question, it looks like there is no article in
the database with id 5. This could happen when you hit “Delete” twice
before the app has a chance to reload the page, or maybe you deleted the
record already. Either way, you can drop into rails console and just do
Article.find(5) and you will see nil as the result – indicating that
there is no record with an id of 5.

So, your code looks OK but for some reason the id being passed was for a
record that didn’t exist. If this continues to happen, try copying &
pasting the View template into a Gist – that will help us see the whole
picture.

-Jason

On 29 September 2014 20:09, Norbert M. [email protected] wrote:

I’d guess that He wanted to Show us a screenshot of the actual errormessage
but his MUA got the HTML-mail wrong. Or our MUA does not support that kind
of embedded images. Since I’m with my mobile right now I can’t check the OPs
mailheaders for misinformation.

Ah, you could be right.
@Aspiring Student if so then copy the error out of the server terminal
window and paste it here, assuming it is in the server window. You
may have to use Ctrl+Chift+C to copy from a terminal window.
If it only appears in the browser then just retype it if you can’t
copy text out of it.

Colin