Is Category A Reserved Word?

Bryan Stewart
I am creating some additional models to support my app in JS. I created first a category scaffold
Bryans-MacBook-Pro:aoss bryan.stewart$ rails g scaffold Category name
/Users/bryan.stewart/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/type.rb:27: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/bryan.stewart/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/type/adapter_specific_registry.rb:9: warning: The called method `add_modifier' is defined here
/Users/bryan.stewart/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/actionpack-6.0.2.1/lib/action_dispatch/middleware/stack.rb:37: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/bryan.stewart/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/actionpack-6.0.2.1/lib/action_dispatch/middleware/static.rb:110: warning: The called method `initialize' is defined here
/Users/bryan.stewart/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/devise_invitable-2.0.1/lib/devise_invitable/models.rb:48: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/bryan.stewart/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/associations.rb:1657: warning: The called method `belongs_to' is defined here
Running via Spring preloader in process 5287
      invoke  active_record
      create    db/migrate/20200315195537_create_categories.rb
      create    app/models/category.rb
      invoke    test_unit
      create      test/models/category_test.rb
      create      test/fixtures/categories.yml
      invoke  resource_route
       route    resources :categories
      invoke  scaffold_controller
      create    app/controllers/categories_controller.rb
      invoke    erb
      create      app/views/categories
      create      app/views/categories/index.html.erb
      create      app/views/categories/edit.html.erb
      create      app/views/categories/show.html.erb
      create      app/views/categories/new.html.erb
      create      app/views/categories/_form.html.erb
      append      app/views/shared/_left_nav.html.erb
      invoke    test_unit
      create      test/controllers/categories_controller_test.rb
      create      test/system/categories_test.rb
      invoke    helper
      create      app/helpers/categories_helper.rb
      invoke      test_unit
      invoke  assets
      invoke    scss
      create      app/assets/stylesheets/categories.scss
Bryans-MacBook-Pro:aoss bryan.stewart$ rails g administrate:dashboard category
Running via Spring preloader in process 5423
/Users/bryan.stewart/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activemodel-6.0.2.1/lib/active_model/type/integer.rb:13: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/bryan.stewart/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activemodel-6.0.2.1/lib/active_model/type/value.rb:8: warning: The called method `initialize' is defined here
/Users/bryan.stewart/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/connection_adapters/postgresql/oid/specialized_string.rb:12: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/bryan.stewart/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activemodel-6.0.2.1/lib/active_model/type/value.rb:8: warning: The called method `initialize' is defined here
      create  app/dashboards/category_dashboard.rb
      create  app/controllers/admin/categories_controller.rb
      insert  config/routes.rb
It seemed to go ok, I can create new Categories via the dashboard, but I get a weird output when adding from admin Dashboard.


ActionController::ParameterMissing in Admin::CategoriesController#create

param is missing or the value is empty: category
Bryan Stewart
This was adjusting in the dashboard.rb. all fixed
Notifications
You’re not receiving notifications from this thread.
© 2022 Jumpstart Pro by GoRails, LLC