回答編集履歴
1
整形
answer
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
> Attribute overrides
|
4
4
|
> No matter which strategy is used, it's possible to override the defined attributes by passing a hash:
|
5
5
|
|
6
|
-
>
|
6
|
+
> # Build a User instance and override the first_name property
|
7
7
|
> user = build(:user, first_name: "Joe")
|
8
8
|
> user.first_name
|
9
|
-
>
|
9
|
+
> # => "Joe"
|