Public Gists by tsaleh

Gravatar
Tue Nov 17 11:50:11 -0800 2009
1
2
3
jQuery.extend({
isReady: false,
readyList: [],
Gravatar
Tue Nov 17 11:48:23 -0800 2009
1
2
3
ready: function(fn) {
// Attach the listeners
bindReady();
Gravatar
Fri Nov 13 09:11:06 -0800 2009
1
2
3
# I add authorization query methods to every ActiveRecord model (through ActiveRecord::Base).
#
# Each model is given the following methods:
Gravatar
Thu Nov 12 16:09:59 -0800 2009
1
2
3
mislav-will_paginate --version '= 2.3.11' --source http://gems.github.com
justinfrench-formtastic --version '= 0.2.2' --source http://gems.github.com
josevalim-inherited_resources --version '= 0.8.5' --source http://gems.github.com
Gravatar
Wed Nov 11 15:07:40 -0800 2009
1
2
3
class ProductState < ActiveRecord::Base
  attr_accessible :name, :description
  
Gravatar
Wed Nov 11 15:07:18 -0800 2009
1
2
3
module IdEnumeration
  def acts_as_enumeration(*ordered_list_of_values)
    ordered_list_of_values.map(&:to_s).each_with_index do |value, index|
Gravatar
Wed Nov 11 09:17:03 -0800 2009
1
2
3
class ShoppingCart < ActiveRecord::Base
  has_many :shopping_cart_items
  
Gravatar
Fri Oct 23 08:36:16 -0700 2009
1
2
3
#header {
  color: black;
 
Gravatar
Wed Oct 14 18:15:31 -0700 2009
1
2
3
d1d466fa50fb8ffe876161bdf42d454e2951291e foo bar - Tammer Saleh
cda4cc825c031f8c72069acbf06dfa20e9ba5a1d bar - Tammer Saleh
c15cd6ce3468c44bb537bdbeb6147398fd14cc18 foo - Tammer Saleh
Gravatar
Thu Sep 17 15:23:02 -0700 2009
1
2
3
scroll_page_to: function(element, doc) {
  if (element.length < 1) { log("Error: cannot find element for scrolling."); };
  var offset = element.offset().top;
Gravatar
Tue Sep 15 13:55:22 -0700 2009
1
2
3
class Counterpoint < ActiveRecord::Base
  belongs_to :owner, :class_name => "User"
  validate :ensure_owned_by_journalist
Gravatar
Tue Sep 15 13:52:35 -0700 2009
1
2
3
  def ensure_owned_by_journalist
    errors.add_to_base("You must be a journalist to create a counterpoint.") unless Counterpoint.creatable?
  end
Gravatar
Mon Sep 14 10:00:21 -0700 2009
1
2
3
  include Webrat::Matchers
  def response_body
    @response.body
Gravatar
Thu Sep 03 11:23:36 -0700 2009
1
2
3
// <div id="note1">
// <div class=".contents"/>
// </div>
Gravatar
Thu Aug 27 08:54:13 -0700 2009
1
2
3
PlatosForms.SideBar = function (tab) {
  var that = this;
 
Gravatar
Thu Aug 27 08:01:17 -0700 2009
1
2
3
SideBar = function (tab) {
  var that = this;
 
Gravatar
Thu Aug 20 14:07:17 -0700 2009
1
2
3
  tab_opened: function(event) {
    PlatosForms.log("1");
    var tab = event.target;
Gravatar
Thu Aug 20 13:51:40 -0700 2009
1
2
3
PlatosForms.Sidebar = function (tab) {
  this.tab = tab;
 
Gravatar
Thu Aug 20 13:44:37 -0700 2009
1
2
3
  tab_opened: function(event) {
    var tab = event.target;
    var sidebar = new PlatosForms.SideBar(tab);
Gravatar
Wed Aug 19 15:54:27 -0700 2009
1
2
3
*~
.DS_Store
.*.swp