Hi nanaya,
with Rails 5.1.4 I can reproduce it:
Having the schema:
create_table “posts”, force: :cascade do |t|
t.string “title”
t.string “content”
t.string “meta_description”
t.datetime “created_at”, null: false
t.datetime “updated_at”, null: false
t.string “slug”
t.boolean “public”
t.string “image”
t.string “image_teaser”
t.string “youtube_id”
t.string “author”, default: “María García”
t.index [“created_at”], name: “index_posts_on_created_at”
t.index [“slug”], name: “index_posts_on_slug”, unique: true
end
And a model with this validations:
class Post < ApplicationRecord
validates :title, presence: true, length: { maximum: 100 }
validates :content, presence: true
validates :meta_description, presence: true, length: { maximum: 155 }
end
I execute:
irb(main):001:0> p = Post.new
=> #<Post id: nil, title: nil, content: nil, meta_description: nil, created_at: nil, updated_at: nil, slug: nil, public: nil, image: nil, image_teaser: nil, youtube_id: nil, author: “Max Mustermann”>
irb(main):002:0> p.save
(0.3ms) BEGIN
(0.4ms) ROLLBACK
=> false
irb(main):003:0> p.save!
(0.4ms) BEGIN
(0.3ms) ROLLBACK
ActiveRecord::RecordInvalid: translation missing: es.activerecord.errors.messages.record_invalid
from (irb):3
irb(main):004:0> p.save! validate: false
(0.3ms) BEGIN
SQL (1.1ms) INSERT INTO “posts” (“created_at”, “updated_at”) VALUES ($1, $2) RETURNING “id” [[“created_at”, “2018-02-11 13:54:05.991094”], [“updated_at”, “2018-02-11 13:54:05.991094”]]
(0.6ms) COMMIT
=> true
irb(main):005:0> p
=> #<Post id: 32, title: nil, content: nil, meta_description: nil, created_at: “2018-02-11 13:54:05”, updated_at: “2018-02-11 13:54:05”, slug: nil, public: nil, image: nil, image_teaser: nil, youtube_id: nil, author: “Max Mustermann”>
May I open an issue?
Best regards,
Alberto Almagro