[RAILS] Error encountered in tagging function implementation

[Implementing tagging function using form object]

スクリーンショット 2020-10-16 17.10.06.png

Enter all the required items and press the Sell button.

Then NoMethodError スクリーンショット 2020-10-16 17.13.07.png

Cause of error [Conclusion] It seems that the cause is inclusion, which is a validation option! !! !! スクリーンショット 2020-10-16 17.27.55.png

Reason: The include method cannot be used in the ActiveModel specifications

[Solution] Change the way validation is written スクリーンショット 2020-10-16 18.06.41.png ((Like this ↑))

If you want to know more, please see below ↓↓↓

[Verification to clarify the cause of the error that occurred first]

~ Verification ~ Apply binding.pry to create on the controller.

スクリーンショット 2020-10-16 17.20.06.png

Hypothesis ① Played by validation スクリーンショット 2020-10-16 17.21.11.png Hypothesis ② Played due to price スクリーンショット 2020-10-16 17.19.32.png

Change the price validation to solve it! スクリーンショット 2020-10-16 17.25.42.pngスクリーンショット 2020-10-16 18.29.29.png

[Supplement] It seems that you can change to this description! !! !! スクリーンショット 2020-10-21 12.50.39.png

Recommended Posts

Error encountered in tagging function implementation
Implement tagging function in form object
Implementation of like function in Java
Unclear error encountered in annotation processing * Unresolved
Error in implementation when implementing Spring validation
DM function implementation
[Rails] Implementation of retweet function in SNS application
Interpreter implementation in Java
Comment function (Ajax) implementation
Follow function (Ajax) implementation
Implementation of search function
[Ruby on Rails] Implementation of tagging function/tag filtering function
Boyer-Moore implementation in Java
Image preview function implementation
Heapsort implementation (in java)
Rails search function implementation
Implementation of pagination function
Error handling in Graphql-ruby
Search function [copype implementation]
Rails sorting function implementation (displayed in order of number of like)
[Rails] Implementation of tagging function using intermediate table (without Gem)
Implement application function in Rails
Rails fuzzy search function implementation
Avoid Yubaba's error in Java
NameError in Income # index error
Implementation of sequential search function
Implement follow function in Rails
ActiveRecord :: NotNullViolation in Devise error
Use ransack Search function implementation
Implementation of like function (Ajax)
[Rails] Implementation of category function
Error in rails db: migrate
npm error in docker tutorial
Implementation of category pull-down function
Error in Spring database connection
Login function implementation with rails
[Rails] Implementation of tutorial function
[Rails] Implementation of like function
Implementation of tri-tree in Java
Implementation of HashMap in kotlin
Validation function in Play Framework
[Rails 6] Pagination function implementation (kaminari)
[Rails] Implementation of new registration function in wizard format using devise
Let's create a TODO application in Java 4 Implementation of posting function
Let's create a TODO application in Java 6 Implementation of search function
[Implementation procedure] Create a user authentication function using sorcery in Rails
Let's create a TODO application in Java 8 Implementation of editing function