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
#! /usr/bin/ruby -w | |
require 'rubygems' | |
require 'rmagick' | |
require 'fileutils' | |
include Magick | |
ARGV.each do |file| | |
puts "Processing #{file}" |
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
module SimpleForm | |
class FormBuilder | |
alias _find_association_reflectio find_association_reflection | |
def find_association_reflection(association) #:nodoc: | |
if reflection = _find_association_reflectio(association) | |
ActiveModelMetadataProxy.new reflection | |
end | |
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
class SomeModel | |
include Mongoid::Document | |
field :date, :type => Date | |
validates_presence_of :date | |
def date=(value) | |
begin | |
date_parsed = value.to_date | |
write_attribute :date, date_parsed |
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
##################################################################### | |
# Simplified Facebook interactions/navigation via Ruby/Mechanize. # | |
# Author: Robbie Harjes # | |
# Date: 6/8/2011 # | |
# Notes: Not liable for misuse; free for non-commercial projects.# | |
# This notice must remain intact if you use this code. # | |
##################################################################### | |
NewerOlder