11
私はちょうど私がルートlocalhost:3000/shared_drives/new
を開くとRailsが "ドライブ"を "drife"に変更したのはなぜですか?
rails g scaffold shared_drive drive_name:string drive_path:string security_group_read:string security_group_modify:string
ヘッダが、私はこのページに新しいオブジェクトを作成しようとすると、私はこのエラーを取得する新しい共有Drifeに
を読み込む。これを実行した
ActionController::ParameterMissing in SharedDrivesController#create
param is missing or the value is empty: shared_drife
何が起こっていますか?!?! Railsが私のモデルの名前を変更したのはなぜですか?
「ドライブ」の特異化では、多少の騒音が出るかもしれません。 – Makoto
@thisguy 'pry(main)> 'drives'.singularize#=>" drive "'あなたはhttp://apidock.com/rails/v4.2.1/ActiveSupport/Inflector/inflectionsを使って修正することができます –
私はそこに少しのタイプミスがあります。それは '' drives'.singularize#=> "drife" 'になります私のブラウザの自動修正は、私ではなく、これを作った。しかし、私はそれに気付かなかった。 –