Rails debug

debug will not display

Page 1 of 1

2 Replies - 1476 Views - Last Post: 07 December 2010 - 02:29 PM Rate Topic: -----

#1 kwikfox  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 21-April 10

Rails debug

Posted 04 December 2010 - 10:15 AM

I am trying to get the rails debug function to display with a web page for trouble for problems.

I would like to post the code, exactly how do I do that?
Is This A Good Question/Topic? 0
  • +

Replies To: Rails debug

#2 kwikfox  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 21-April 10

Re: Rails debug

Posted 04 December 2010 - 10:33 AM

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
  "http://www.w3.org/TR/html4/DTD/strict.dtd">
<html>
    <head>

        <title><%=@title%></title>
        <%=stylesheet_link_tag"page name" %>
    </head>

    <body>
      <div id ="whole page">
        <div id="header">page name</div>
          <div id ="nav">
          <%= link_to_unless_current "Home",     :action => "index" %> |
          <%= link_to_unless_current "About",    :action => "about" %> |
          <%= link_to_unless_current "Help",     :action => "help" %>
          </div>

          <div id="content">

          <%= @content_for_layout %>
          <p>Copyright &copy; </p>
          </div>

        <% if ENV["RAILS_ENV"] == "developement" %>
            <%= debug(params) %>
          <%end%>

      </div>
    </body>
</html>


Was This Post Helpful? 0
  • +
  • -

#3 nimajneb  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 12
  • View blog
  • Posts: 116
  • Joined: 04-August 10

Re: Rails debug

Posted 07 December 2010 - 02:29 PM

<%= debug(params) if Rails.env.development? %>



...if you want it to only show during development stage. Also responds to .test or .production
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1