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
| #bunch.rb | |
| Factory.define :bunch , :class => Bunch do |f| | |
| f.ribbon_color {|ribbon_color|ribbon_color.association(:ribbon_color) } | |
| f.date "2011-01-12 22:37:49" | |
| f.user_id 1 | |
| f.after_build { |f| | |
| f.bunch_lots << Factory.build(:bunch_lot) | |
| } | |
| end | |
| Factory.define :lot, :class => Lot do |f| |
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
| #antes: | |
| Factory.define :bunch , :class => Bunch do |f| | |
| f.ribbon_color_id 1 | |
| f.production_unit_id 1 | |
| f.release "2011-01-12 22:37:49" | |
| f.user_id 1 | |
| end | |
| Factory.define :lot, :class => :Lot do |f| | |
| f.production_unit_id 1 |
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
| apt-get install build-essential zlib1g-dev libssl-dev libreadline5-dev | |
| sudo apt-get install ruby-full libmysql-ruby librmagick-ruby build-essential | |
| apt-get install git-core | |
| wget http://rubyforge.org/frs/download.php/74445/rubygems-1.6.2.tgz |
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
| def date=(date) | |
| write_attribute(:date, date.gsub(/(\d{4})\/(\d{2})\/(\d{2})/, "#{$3}/#{$2}/#{$1}")) | |
| end |
NewerOlder