# Model
class GradeScaleRange < ActiveRecord::Base
end
# Factory
# Normally case -> OK!
Factory.define :grade_scale_range do
end
# This will scream!
Factory.define :grade_scale_range_a do
end
# Correct it with class name
Factory.define :grade_scale_range_a, :class => 'grade_scale_range' do
end
# Although the below seems ok in documentation. It will spew "dup NilClass" error
Factory.define :grade_scale_range_a, :class => GradeScaleRange do
end
Tuesday, September 8, 2009
Using a factory name that doesn't correspond to a model
Subscribe to:
Post Comments (Atom)
Blog Archive
-
▼
2009
(143)
-
▼
September
(68)
- Using %\\ for strings instead of "" or ''
- Clicking on links in Webrat using XPath
- Problem with nested attributes for has one relatio...
- Best built in Vim color theme for Rails
- Run windows maximized by default in Ubuntu
- Make Gnome Panel autohide 100%
- Rip video or audio from Youtube video
- Using Irssi
- % and # in Vim
- Select last tab in Firefox
- Insert shell output into Vim
- How to use Git tags
- Record & playback Screen session
- Git fetch remote branches
- Aborting a Git rebase
- Send message to all users attached Screen session
- Pair programming Editors/ IDE plugins
- Intel Core 2 Duo vs AMD Turion X2 Ultra
- Use rtcwake to "wake up" from sleep mode at a give...
- View difference between Ubuntu date and Bios clock
- Using Rsync to synchronize folders between machines
- Installing PADevchooser gui for pulseaudio
- Finding CPU info in terminal
- Find files & directories in terminal
- List of bash shortcuts
- Make long multiple system commands in ruby more re...
- Adding digital signature to a Office document
- Best way to edit pdf files in Linux
- Annotate over PDF files using flpsed in Linux
- Copy into global clipboard in Vim
- An example .screenrc file
- Searching in Less
- Screen profile in Ubuntu
- Using single Screen session with multiple windows
- Execute shell commands in Vim
- Scrolling in Screen session
- Status flags in Mutt
- List files with human readable filesize
- Pipe less with colors
- Share screen session on iPhone
- Share terminal session to remote user using screen
- Ruby Case statements
- Ruby metaprogramming toolbox
- Dir.glob to get filenames in directory
- Use File.join to state file pathname
- Highlight line in Vim
- Open shell in Vim
- Use "p" instead of "puts Object.inspect"
- Autocomplete in Vim
- Better testing of form elements in Cucumber using ...
- Using a factory name that doesn't correspond to a ...
- Use TightVNC viewer with Vino
- Batch remove/rename files in terminal
- Installing Hamachi for remote desktop (VNC) over VPN
- Formatting of date in bash terminal
- Ruby regular expression
- Parse timestamp string to ruby Time object
- Building a command line twitter client
- Using ruby to output ansi colors in terminal
- Commandline password prompt in ruby
- Use nmap to scan for open ports
- How to use irssi
- Tips to use mobileterminal on iPhone
- Cucumber feature template
- Do not use Ruby's Enumerable find() method in Rails
- The problem with using Rail's try() method
- Git: creating, pushing & deleting remote branches
- Hidden features of Ruby
-
▼
September
(68)
No comments:
Post a Comment