Created
March 3, 2017 00:28
-
-
Save superhighfives/6b3b59a447033bfbc9bea019934fb00f 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 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