Fellow Stranger
Fellow Stranger

Reputation: 34013

Check for values passed to the view with the instance object

When I add a value to an instance object in the controller, like so:

@post = Post.new(published: false)

I expected it to show up in the params, or SOMEWHERE in the server logs or SOMEWHERE inspecting the web console (the Net tab in FF).

But I cannot see it being transferred in any other way than by displaying it in a form field.

What alternative ways are there to debug instance object values?

Upvotes: 0

Views: 25

Answers (1)

Marek Lipka
Marek Lipka

Reputation: 51151

You can call

<%= debug @post %>

in your view.

Upvotes: 1

Related Questions