ruby on rails - NoMethodError in Admin::ApartmentPostsController#create -


i using active admin admin panel in ruby on rails website. have code on apartmentpost resource.

activeadmin.register apartmentpost permit_params :title, :max_stay, :min_stay, :bed_configuration, :number_of_guests,                         :features, :description, :admin_user_id, :apartment_number,:latitude, :longitude, :clean_fee, :country, :location, photos: []   form(html: { multipart: true }) |f| f.inputs   f.input :title   f.input :max_stay   f.input :min_stay   f.input :bed_configuration   f.input :number_of_guests   f.input :features   f.input :description   f.input :country   f.input :location   f.input :apartment_number   f.input :latitude   f.input :longitude   f.input :clean_fee   f.input :admin_user_id, as: :hidden, input_html: {value: current_admin_user.id}   f.file_field :photos, multiple: true end f.actions end 

so error getting while creating new apartmentpost. error is:

enter image description here

i had created column called rate in aparmentpost removed. still gives error.

here's table schema.rb:

create_table "apartment_posts", force: :cascade |t| t.integer  "admin_user_id",                   null: false t.integer  "max_stay",                        null: false t.string   "bed_configuration",               null: false t.integer  "number_of_guests",                null: false t.string   "features",                        null: false t.string   "description",                     null: false t.json     "photos" t.datetime "created_at",                      null: false t.datetime "updated_at",                      null: false t.string   "title",                           null: false t.string   "country",                         null: false t.string   "apartment_number",                null: false t.string   "latitude" t.string   "longitude" t.integer  "min_stay",                        null: false t.string   "location",                        null: false t.integer  "clean_fee",         default: 100, null: false t.integer  "property_type_id" t.index ["admin_user_id"], name: "index_apartment_posts_on_admin_user_id", using: :btree t.index ["property_type_id"], name: "index_apartment_posts_on_property_type_id", using: :btree end 

here's code in routes.rb

devise_for :admin_users, activeadmin::devise.config activeadmin.routes(self) 

i new in rails , active admin. tried searching solution everywhere tried uninstalling active_admin gem , installing again , removing apartment_post resource , generating again none og them worked.

you forgot remove rate somewhere in codebase. try searching if missed anything.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -