README.md in rails_dt-0.1.0 vs README.md in rails_dt-0.1.1
- old
+ new
@@ -19,12 +19,16 @@
$ script/generate rails_dt
Follow the instructions the generator gives you (they are listed below):
-In your `app/controllers/application_controller`, add:
+In your `config/environment.rb`, add:
+ config.gem "rails_dt"
+
+Inside your `ApplicationController` class, add:
+
handles_dt
In your `app/views/layouts/application.html.erb` `<head>` section, add:
<%= stylesheet_link_tag "dt" %>
@@ -34,32 +38,42 @@
<div class="DT">
<%= DT.to_html %>
</div>
+Checking Setup
+--------------
+
+Somewhere in your `app/views/layouts/application.html.erb`, add:
+
+ <% DT.p "hello, world" %>
+
+Refresh a page that uses this layout. You should see "hello, world" beneath your main page content.
+
+
Debugging...
------------
-### ...models ###
+### ...Models ###
def before_save
DT.p "in before_save"
end
-### ...controllers ###
+### ...Controllers ###
def action
DT.p "hi, I'm #{action_name}"
end
-### ...views ###
+### ...Views ###
<div class="body">
<% DT.p "@users", @users %>
</div>
-### ...filters ###
+### ...Filters ###
Insert debugging code:
before_filter do
DT.p "in before_filter xyz"
@@ -70,9 +84,14 @@
end
See it in action:
$ tail -f log/dt.log
+
+### ...Anything! ###
+
+To conclude it, `DT.p` is the universal method you can print your debug messages with.
+
Feedback
--------