# Bench with unassigned attributes

**URL:** <https://community.rubybench.org/t/bench-with-unassigned-attributes/86>\
**Category:** Uncategorized\
**Created:** [September 29, 2015, 3:18pm UTC](https://community.rubybench.org/t/bench-with-unassigned-attributes/86 "2015-09-29T15:18:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/rubybench/original/1X/4ae23b7eff9a1b039e126f05dd734ab09c8ab4b5.png) [@system](https://community.rubybench.org/u/system)\
**Post date:** [September 29, 2015, 3:18pm UTC](https://community.rubybench.org/t/bench-with-unassigned-attributes/86/1 "2015-09-29T15:18:52Z")

</div>

> <https://twitter.com/sgrif/status/648592985534373888>

I’m not quite sure what a saved record with unassigned attributes means.

```ruby
user = User.create!(name: 'abcde', long_name: 'abcdefgh')
user.reload
user.name = 'abcde'
user.long_name = 'new name'
user.save

```

Perhaps something like this?

---

<div class="post-metadata">

**Author:** ![fantasticfears](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rubybench.org/fantasticfears/32/76_2.png) [@fantasticfears](https://community.rubybench.org/u/fantasticfears)\
**Post date:** [May 6, 2016, 7:43am UTC](https://community.rubybench.org/t/bench-with-unassigned-attributes/86/2 "2016-05-06T07:43:37Z")

</div>

I guess it’s default value from migration. i.e. AR skips setting the value and padded by PG later on.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/rubybench/original/1X/4ae23b7eff9a1b039e126f05dd734ab09c8ab4b5.png) [@system](https://community.rubybench.org/u/system)\
**Post date:** [May 6, 2016, 7:53am UTC](https://community.rubybench.org/t/bench-with-unassigned-attributes/86/3 "2016-05-06T07:53:07Z")

</div>

Is there an example? I still don’t quite understand what it means 🙂

---

<div class="post-metadata">

**Author:** ![fantasticfears](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rubybench.org/fantasticfears/32/76_2.png) [@fantasticfears](https://community.rubybench.org/u/fantasticfears)\
**Post date:** [May 6, 2016, 7:56am UTC](https://community.rubybench.org/t/bench-with-unassigned-attributes/86/4 "2016-05-06T07:56:55Z")

</div>

Suppose your example:

Migration:

```ruby
create_table :users do |t|
  t.text :name, null: false
  t.text :long_name, default: 'long'
  t.timestamps
end

```

`long_name` is not assigned in that case:

```ruby
user = User.new(name: 'abcde')
user.save

```
