0

I have the following in a view file:

<%= render :partial => "medium_deal", :collection => category_locales, :as => :deal_locale %>

In my partial template file, I want to print out all attributes for deal_locale. How can I do that? (Basically, a var_dump in PHP)

1 Answer 1

1

I'm assuming this is just for debugging purposes? If so

<% logger.info "#{deal_locale.inspect}" %>

should do the trick.

Or, if you really want to see it in your browser, just

<%= "#{deal_locale.inspect}" %>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.