約3,540件1ページ目

条件を指定して検索しています。すべての条件を解除する

  • 最終更新日:3か月以内
  • 2024/5/8 -The validate_foreign_key method is used to validate the foreign key constraint on a table. In other words, it checks that the value in the foreign key column of ...

    2024/5/10 -1. Validations. You can validate that start_time cannot be in the past with the comparison validator (added in Rails 7): validates :start_time, comparison: ...

    3日前 -※背番号(number)属性と名前(name)属性に「presence: true」を指定することで背番号と名前に「空を禁止(値を必ず入れなければいけない)」という制限を加えた。

    2024/6/3 -Let's see how to validate an association in Rails. Let's look at the example below. # app/models/work/delivery.rb class Work:: ...

    2024/6/12 -Hey there, I am having a heck of a time dealing with the sending of boolean values to a json schema for validation. My data is hitting a json schema…

    2024/6/4 -Validation rules that can differ for new or existing objects. class Account < ActiveRecord::Base validates :subdomain, :name, ...

    A.回答を一意にするUserなのかどうかを判別するフラグを新たに持たせて、それをwith_optionsメソッドで判定すればいいです。 以下を参考にしてください。 Railsで特定の条件下で走る...

    A.validates は ActiveModel::Validations モジュールで 定義されてる特異メソッドで ActiveRecord::Base などの フィールドをチェックします。 今...

    A.データベースより前に、フロントエンドの脆弱性対策が先だと思います。 まずは、無料のツールを使ってみてはいかがですか。 https://yun-craft.com/admin-blog/tomiz...

    2024/6/25 -TIL is an open-source project by Hashrocket that exists to catalogue the sharing & accumulation of knowledge as it happens day-to-day.

    2024/7/6 -Steps to reproduce Create an enum attribute backed by postgres with validate: true Create an uniqueness validation for another attribute with scope: ...

    2024/5/6 -Ruby on Railsには、ユーザがフォームで入力した値が、開発者が決定したルールに沿っていることを検証するためにActiveModel::Validationsモジュール(以降、Validations) ...

    2024/5/18 -単体テストコードでエラーと超格闘してます。そこでバリデーションを任意で設定する方法について、わかったのでアウトプットします。