mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
[ci skip] correct example output and filename in pg guide
This commit is contained in:
parent
71bb8c34f5
commit
85774cfb1a
1 changed files with 2 additions and 2 deletions
|
@ -214,7 +214,7 @@ Currently there is no special support for enumerated types. They are mapped as
|
||||||
normal text columns:
|
normal text columns:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
# db/migrate/20131220144913_create_events.rb
|
# db/migrate/20131220144913_create_articles.rb
|
||||||
execute <<-SQL
|
execute <<-SQL
|
||||||
CREATE TYPE article_status AS ENUM ('draft', 'published');
|
CREATE TYPE article_status AS ENUM ('draft', 'published');
|
||||||
SQL
|
SQL
|
||||||
|
@ -276,7 +276,7 @@ end
|
||||||
# Usage
|
# Usage
|
||||||
User.create settings: "01010011"
|
User.create settings: "01010011"
|
||||||
user = User.first
|
user = User.first
|
||||||
user.settings # => "(Paris,Champs-Élysées)"
|
user.settings # => "01010011"
|
||||||
user.settings = "0xAF"
|
user.settings = "0xAF"
|
||||||
user.settings # => 10101111
|
user.settings # => 10101111
|
||||||
user.save!
|
user.save!
|
||||||
|
|
Loading…
Reference in a new issue