- Here are some default vars for the process
ISO_DIR=~/fedora;
ROOTFS_MOUNT_DIR=/mnt/contents
DISTRO_LOCATION=| module ActiveRecord | |
| module RailsAdminEnum | |
| def enum(definitions) | |
| super | |
| definitions.each do |name, values| | |
| define_method("#{ name }_enum") { self.class.send(name.to_s.pluralize).to_a } | |
| define_method("#{ name }=") do |value| | |
| if value.kind_of?(String) and value.to_i.to_s == value |
| var DateHelper = { | |
| // Takes the format of "Jan 15, 2007 15:45:00 GMT" and converts it to a relative time | |
| // Ruby strftime: %b %d, %Y %H:%M:%S GMT | |
| time_ago_in_words_with_parsing: function(from) { | |
| var date = new Date; | |
| date.setTime(Date.parse(from)); | |
| return this.time_ago_in_words(date); | |
| }, | |
| time_ago_in_words: function(from) { |