This file contains hidden or 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 EmailTemplate < ActiveRecord::Base | |
translates :name, :content | |
end |
This file contains hidden or 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
import java.net.*; | |
import java.io.*; | |
public class HelloOpenKeyVal { | |
static String base_url = "http://openkeyval.org/"; | |
public static void main(String[] args) throws Exception { | |
//System.out.println(get("cowboytomash10")); | |
//System.out.println(post("cowboytomash10", "what the fuck, man")); | |
} |
This file contains hidden or 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
# Returns a randomly generated sentence of lorem ipsum text. | |
# The first word is capitalized, and the sentence ends in either a period or | |
# question mark. Commas are added at random. | |
def sentence | |
# Determine the number of comma-separated sections and number of words in | |
# each section for this sentence. | |
sections = [] | |
1.upto(rand(5)+1) do | |
sections << (WORDS.sort_by{rand}.slice(0...(rand(9)+3)).join(" ")) |
This file contains hidden or 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 'config/environment.rb' | |
class GlobalizeCountry < ActiveRecord::Base | |
end | |
class GlobalizeLanguage < ActiveRecord::Base | |
end | |
class GlobalizeTranslation < ActiveRecord::Base | |
belongs_to :language, :class_name => "GlobalizeLanguage" |
NewerOlder