Skip to content

Instantly share code, notes, and snippets.

@superhighfives
Created March 3, 2017 00:28
Show Gist options
  • Save superhighfives/6b3b59a447033bfbc9bea019934fb00f to your computer and use it in GitHub Desktop.
Save superhighfives/6b3b59a447033bfbc9bea019934fb00f to your computer and use it in GitHub Desktop.
Rails 5 API + ActiveAdmin + create-react-app on Heroku
ActiveAdmin.register Drink do
permit_params :title, :description, :steps, :source
# 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