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 Zine < ActiveRecord::Base | |
validates_presence_of :title, :downloads | |
has_many :tag | |
def self.latest | |
find(:first, | |
:select => "id", | |
:order => "id DESC") | |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<style type="text/css" media="screen"> | |
table { margin-top: 300px; } | |
th { background: #eee; } | |
th span { |
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
<!--[if !IE]><!--> | |
<h1>You are NOT using Internet Explorer</h1> | |
<!--<![endif]--> |
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
def flash_video_tag(css_id, file_url, size="640x480", options={}) | |
if options[:autostart] | |
autostart = "true" | |
end | |
width, height = size.split("x") | |
player_url = "#{flash_video_host}players/player-licensed.swf" | |
player_args = "file=#{file_url}&autostart=#{autostart}" | |
player_url_and_args = "#{player_url}?#{player_args}" |
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 PlantsController < ApplicationController | |
respond_to :html, :json, :xml, :csv, :yaml, :txt | |
def index | |
if params[:q] | |
@plants = Plant.search(params[:q]).paginate(:page => params[:page], :per_page => 50) | |
else | |
@plants = Plant.paginate(:page => params[:page], :per_page => 50) | |
end | |
respond_with @plants |
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
<!-- iPad Goodies --> | |
<link media="only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation:landscape)" href="ipad-landscape.css" type="text/css" rel="stylesheet" /> | |
<link media="only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation:portrait)" href="ipad-portrait.css" type="text/css" rel="stylesheet" /> | |
<!-- End iPad --> | |
<!-- iPhone Goodies --> | |
<link media="only screen and (min-device-width: 320px) and (max-device-width: 480px) and (orientation:landscape)" href="iphone-landscape.css" type="text/css" rel="stylesheet" /> |
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 "date" | |
require "time" | |
# converts base10 integers into NewBase60 | |
def num_to_sxg(num=nil) | |
sxg = "" | |
vocabulary = "0123456789ABCDEFGHJKLMNPQRSTUVWXYZ_abcdefghijkmnopqrstuvwxyz" | |
return 0 if num.nil? || num.zero? |
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
ooooooooopoill;;;;;;;;;;;;;;;;;;;;;;;;;;;;''''''''''''''''''''''''''''';;;;;;;;;;;;;/ | |
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
test_login(LoginLogoutTest): | |
RuntimeError: Missing rack.input | |
facebooker (1.0.75) lib/facebooker/rails/facebook_url_rewriting.rb:42:in `can_safely_access_request_parameters?' | |
facebooker (1.0.75) lib/facebooker/rails/facebook_url_rewriting.rb:37:in `link_to_canvas?' | |
facebooker (1.0.75) lib/facebooker/rails/facebook_url_rewriting.rb:47:in `rewrite_url' | |
(eval):17:in `new_session_url' | |
/test/integration/login_logout_test.rb:8:in `test_login' |
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
defaults write com.macromates.textmate OakDefaultLanguage E00B62AC-6B1C-11D9-9B1F-000D93589AF6 |
OlderNewer