Skip to content

Instantly share code, notes, and snippets.

View ch1ago's full-sized avatar
🏠
Working mostly from home since 2006

Thiago Almeida ch1ago

🏠
Working mostly from home since 2006
  • Mexico City
View GitHub Profile
Started GET "/out" for 187.7.224.38 at 2010-12-28 09:42:04 -0800
Processing by Devise::SessionsController#destroy as HTML
[paperclip] Saving attachments.
Redirected to http://executter.com/
Completed 302 Found in 9ms
Started GET "/" for 187.7.224.38 at 2010-12-28 09:42:04 -0800
Processing by HomeController#index as HTML
Redirected to http://executter.com/in
Started GET "/Thiago/list/followers" for 127.0.0.1 at 2010-12-21 16:22:15 -0200
Processing by UsersController#list as HTML
Parameters: {"id"=>"Thiago", "list"=>"followers"}
User Load (12.2ms) SELECT "users".* FROM "users" WHERE (lower(username)='thiago') LIMIT 1
Relationship Load (1.1ms) SELECT user2_id FROM "relationships" WHERE ("relationships".user1_id = 3 AND ("relationships"."is_followed" = 't'))
User Load (240.6ms) SELECT "users".* FROM "users" WHERE (id in (2,1,4,6,10,14,17,18,26,28,29,23,22,31,34))
Post Load (31.4ms) SELECT "posts".* FROM "posts" WHERE ("posts"."id" IN (356,359,203,348,317,74,338,361,287,333,327,294,363))
Photo Load (0.6ms) SELECT "photos".* FROM "photos" WHERE ("photos"."id" IN (1,2,3,13,7,11,12,21,33,49,28,34,56,60))
User Load (4.5ms) SELECT "users".* FROM "users" WHERE ("users"."id" = 3) LIMIT 1
Photo Load (0.3ms) SELECT "photos".* FROM "photos" WHERE ("photos"."id" = 50) LIMIT 1
<!DOCTYPE html>
<html>
<head>
<title>Teste</title>
<%= stylesheet_link_tag :all %>
<%= javascript_include_tag :defaults %>
<%= csrf_meta_tag %>
<style>
body {background:#C52F24;margin:0}
div.menu {width:800px;background:#D5E9F6;margin:0 auto;padding: 10px 20px;text-align:right;color:#333;}
Started GET "/site/exce" for 187.58.37.215 at 2010-11-27 13:22:32 -0800
Processing by SiteController#exce as HTML
Completed in 0ms
Rendered vendor/plugins/exception_notification/lib/exception_notification/views/exception_notification/notifier/_request.text.erb (1.0ms)
Rendered vendor/plugins/exception_notification/lib/exception_notification/views/exception_notification/notifier/_message.text.erb (0.3ms)
Rendered vendor/plugins/exception_notification/lib/exception_notification/views/exception_notification/notifier/_application_trace.text.erb (0.5ms)
Rendered vendor/plugins/exception_notification/lib/exception_notification/views/exception_notification/notifier/_full_trace.text.erb (0.6ms)
Rendered vendor/plugins/exception_notification/lib/exception_notification/views/exception_notification/notifier/_session.text.erb (0.9ms)
Rendered vendor/plugins/exception_notification/lib/exception_notification/views/exception_notification/notifier/notify.text.erb (27.7ms)
Rendered vendor/plugins/exception_notification/li
NameError in Site#exce
Showing /home/r3/apps/ex1/vendor/plugins/exception_notification/lib/exception_notification/views/exception_notification/notifier/_request.text.erb where line #3 raised:
uninitialized constant ActionView::CompiledTemplates::PP
Extracted source (around line #3):
1: * URL : <%= raw @request.url %>
2: * IP address: <%= raw @request.remote_ip %>
config.active_record.observers = :user_observer
class UserObserver < ActiveRecord::Observer
def before_save(user)
self.username = self.username.gsub ' ','_'
self.email = self.email.downcase
end
r = "lala https://gist.github.com/ lele http://github.com/ lili www.google.com/ lolo"
urls = r.split(/\s+/).find_all { |u| u =~ /^https?:/ }
urls.each do |url|
r = r.gsub(url,"<a href='#{url}' target='_blank'>#{url}</a>")
end
r
-------------------------
module I18n
def self.translate(skey)
return 'aaaa' if skey=='a'
return super.translate(skey) #this line is wrong, what do I need to do to use the default function again?
end
end
"/"
Started GET "/" for 127.0.0.1 at 2010-11-04 18:23:31 -0200
Processing by SiteController#index as HTML
Exist fragment? views/0.0.0.0:3000/site/index (0.4ms)
Exist fragment? views/0.0.0.0:3000/site/index (0.0ms)
Read fragment views/0.0.0.0:3000/site/index (0.1ms)
Rendered parts/_head.html.erb (0.2ms)
ActsAsTaggableOn::Tag Load (0.4ms) SELECT name FROM "tags"
Carrinho Load (0.4ms) SELECT "carrinhos".* FROM "carrinhos" WHERE ("carrinhos"."session_id" = '61e97791162a21bef5b573198a829671') LIMIT 1
def self.translate_hash_keys(source)
r = {}
source.each { |k,v| r[I18n.t k] = v }
r
end
BACKGROUND_REPEAT_POLICIES = {0=>'no-repeat',1=>'repeat'}#repeat-X, repeat-Y
GENDERS = {'-'=>'0','model.user.gender.female'=>'1','model.user.gender.male'=>'2'}