-
Notifications
You must be signed in to change notification settings - Fork 2
Adding atoms to a model
Petr Marek edited this page Oct 21, 2020
·
2 revisions
# app/models/my_project/product.rb
class MyProject::Product < ApplicationRecord
include Folio::HasAtoms::Basic
end
Add atoms_strong_params
.
# app/controllers/folio/console/my_project/products_controller.rb
module Folio
class Console::MyProject::ProductsController < Console::BaseController
...
private
def product_params
params.require(:my_project_product)
.permit(:title,
:description,
*atoms_strong_params)
end
end
end