Ruby– category –
-
【Ruby on Rails】ransackの関連を調べる方法
やり方 rails consoleを開く。 [8] pry(main)> Gorira.ransackable_associations => ["corporation", "user", "articles", "schools", "shool_goriras"] ... -
【Ruby on Rails】migrationファイルでコメントをつける方法
migrationファイルでコメントをつける方法を解説しておく。 migrationファイルのコメントの書き方 まず基本 class CreateProducts < ActiveRecord::Migration[7.... -
【Ruby on Rails】migrationファイルに外部キー制約を付与する。
外部キー制約について class CreateProducts < ActiveRecord::Migration[7.0] def change create_table :goriras, comment: " ゴリラ" do |t| t.references :ani... -
RuboCopでこんなエラーが出た。Assignment Branch Condition size for search is too high.
なんだこのエラーは https://github.com/rubocop-hq/rubocop/tree/v0.28.0Assignment Branch Condition size for search is too high. [<10, 21, 5> 23.79/20... -
The data directory was initialized by PostgreSQL version 13, which is not compatible with this version 14.0.
久しぶりにエラーに出くわしてしまった The data directory was initialized by PostgreSQL version 13, which is not compatible with this version 14.0. これだ。Rai... -
rbenvでRubyの最新版をダウンロードする。
Rubyの最新版をrbenvでダウンロードする方法 Rubyの公式サイトで確認する。 Rubyの最新版はどのバージョンか確認してみよう。 https://www.ruby-lang.org/ja/downloads/...
12