Skip to content

Instantly share code, notes, and snippets.

@superhighfives
Last active March 6, 2017 17:08
Show Gist options
  • Save superhighfives/35e70790ffe121415ff9ce9cbb01f535 to your computer and use it in GitHub Desktop.
Save superhighfives/35e70790ffe121415ff9ce9cbb01f535 to your computer and use it in GitHub Desktop.
Rails 5 API + ActiveAdmin + create-react-app on Heroku
ActiveAdmin.register Ingredient do
permit_params :description, :drink_id
# See permitted parameters documentation:
# https://github.com/activeadmin/activeadmin/blob/master/docs/2-resource-customization.md#setting-up-strong-parameters
#
# permit_params :list, :of, :attributes, :on, :model
#
# or
#
# permit_params do
# permitted = [:permitted, :attributes]
# permitted << :other if params[:action] == 'create' && current_user.admin?
# permitted
# end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment