From 2123cb8632eaa4de6324f67123f80b4ef0f0fed7 Mon Sep 17 00:00:00 2001 From: jaeckel Date: Fri, 6 Nov 2009 15:09:00 +0100 Subject: [PATCH] use hirb by default also display sql queries in console --- config/environments/development.rb | 13 ++++++++++++- config/hirb.yml | 13 +++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 config/hirb.yml diff --git a/config/environments/development.rb b/config/environments/development.rb index 85c9a6080e..371e7e4b00 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -14,4 +14,15 @@ config.action_controller.perform_caching = false # Don't care if the mailer can't send -config.action_mailer.raise_delivery_errors = false \ No newline at end of file +config.action_mailer.raise_delivery_errors = false + +# use hirb +config.gem 'hirb' + +if $0 == 'irb' + require 'hirb' + Hirb.enable + + # show sql queries in console + ActiveRecord::Base.logger = Logger.new STDOUT +end \ No newline at end of file diff --git a/config/hirb.yml b/config/hirb.yml new file mode 100644 index 0000000000..6daf6575b6 --- /dev/null +++ b/config/hirb.yml @@ -0,0 +1,13 @@ +:output: +# Url Model + Url: + :options: + :fields: + - id + - name + - description + - quick_mode_tag_list + NamespaceTree: + :class: Hirb::Helpers::Tree + :output_method: to_tree + :ancestor: true