Last active
March 6, 2017 17:08
-
-
Save superhighfives/35e70790ffe121415ff9ce9cbb01f535 to your computer and use it in GitHub Desktop.
Rails 5 API + ActiveAdmin + create-react-app on Heroku
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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