This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HTTP/1.1 200 OK | |
Date: Sat, 18 Jul 2009 11:58:42 GMT | |
Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7l DAV/2 Phusion_Passenger/2.2.2 | |
Last-Modified: Tue, 07 Jul 2009 12:42:29 GMT | |
Accept-Ranges: bytes | |
Content-Length: 78630 | |
Cache-Control: max-age=63072000 | |
Expires: Mon, 18 Jul 2011 11:58:42 GMT | |
Content-Type: image/png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
RewriteCond %{REQUEST_URI} (css|js|jpe?g|png|gif|ico)$ [NC] | |
RewriteCond %{QUERY_STRING} ^[0-9]+$ | |
RewriteRule ^(.*)$ $1 [E=set_expires_header:true,L] | |
Header add Expires "Wed, 04 Aug 2018 16:46:21 -0500" env=set_expires_header |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@user.friends.map {|friend| friend.id} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@user.friends.sort_by { |friend| [ friend.online? ? 1 : 0,friend] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
friends.accepted.map{ |friend| friend.logs.visible_for(self) }.flatten |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
User.all.map{|user| [user.name, user.id] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * FROM "users" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
User.paginate(:page => params[:page], :per_page => 10,:select => "name, id").map{|user| [user.name, user.id]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
script_console_running = ENV.include?('RAILS_ENV') && IRB.conf[:LOAD_MODULES] && IRB.conf[:LOAD_MODULES].include?('console_with_helpers') | |
if script_console_running | |
require 'logger' | |
Object.const_set(:RAILS_DEFAULT_LOGGER, Logger.new(STDOUT)) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Tag < ActiveRecord::Base | |
translates :name, :slug | |
# load our code explicitly to make sure it gets loaded in development mode | |
require 'tag_translation.rb' if Rails.env.development? | |
end |