Skip to content

Commit

Permalink
don't handle references for rails pre 2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dchelimsky committed May 12, 2009
1 parent 614b5da commit c96b207
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion generators/rspec_default_values.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ def default_value
end

def name_or_reference
reference? ? :"#{name}_id" : name
if ::Rails::VERSION::STRING >= '2.2'
reference? ? :"#{name}_id" : name
else
name
end
end
end
end
Expand Down

0 comments on commit c96b207

Please sign in to comment.