aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/fixtures.rb
diff options
context:
space:
mode:
authorJeremy Baker <jhubert@gmail.com>2015-06-13 23:09:25 -0700
committerJeremy Baker <jhubert@gmail.com>2015-06-13 23:09:25 -0700
commita5c06e14c64d9223199ba887e79d5408705a34af (patch)
tree17232babace893ead81cb102cb33b8d7bb8d5a60 /activerecord/lib/active_record/fixtures.rb
parent3692ca5ce7a0dbb11c4001891488905c53fbc5e5 (diff)
downloadrails-a5c06e14c64d9223199ba887e79d5408705a34af.tar.gz
rails-a5c06e14c64d9223199ba887e79d5408705a34af.tar.bz2
rails-a5c06e14c64d9223199ba887e79d5408705a34af.zip
[ci skip] Fix the dynamic fixtures example
My impression of the code sample is that the intent is to assign guy_1, guy_2, etc. The code as it stood would have assigned guy_1, guy_1, etc. This simply replaces the 1 with the iterator variable i.
Diffstat (limited to 'activerecord/lib/active_record/fixtures.rb')
-rw-r--r--activerecord/lib/active_record/fixtures.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb
index 738fab2bd9..b01444a090 100644
--- a/activerecord/lib/active_record/fixtures.rb
+++ b/activerecord/lib/active_record/fixtures.rb
@@ -110,7 +110,7 @@ module ActiveRecord
# <% 1.upto(1000) do |i| %>
# fix_<%= i %>:
# id: <%= i %>
- # name: guy_<%= 1 %>
+ # name: guy_<%= i %>
# <% end %>
#
# This will create 1000 very simple fixtures.