วันอาทิตย์ที่ 21 ตุลาคม พ.ศ. 2555

Change skin of Chrome developer tools


เปลี่ยน Skin ให้ Chrome Developer Tools


1)  เปิด Chrome's user stylesheet's directory  
Windows: "C:\Users\**Your username**\AppData\Local\Google\Chrome\User Data\Default\User StyleSheets\"  
Mac: "~/Library/Application Support/Google/Chrome/Default/User StyleSheets/"  
Linux: "~/.config/chrome/Default/User StyleSheets/" 
2)  Download Skin : Ruby Blue
3)  วาง Custom.css ทับของเดิม

ทีมา : https://plus.google.com/115133653231679625609/posts/UZF34wPJXsL

วันพุธที่ 13 มิถุนายน พ.ศ. 2555

Rails : Error omniauth + rack


Error following below
[FATAL]
NoMethodError (undefined method `include?' for nil:NilClass):
  omniauth (1.1.0) lib/omniauth/builder.rb:47:in `call'
  actionpack (3.2.2) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
  rack (1.4.0) lib/rack/etag.rb:23:in `call'
  ....

Solution
  fixed  in gem with rack, '~> 1.4.0'

วันอังคารที่ 3 เมษายน พ.ศ. 2555

rails 3: Rails logger outside controller and model

ทำอย่างไร ถ้าต้องการเขียน log นอก controller และ model ?


ใช้ Rails.logger.info "Some debugging info I want to see in my development log."