spec/dummy/app/controllers/photos_controller.rb
# Only allow a trusted parameter "white list" through.

Only allow a trusted parameter "white list" through.
Only allow a trusted parameter " white list " through .
def photo_params
      if Bread.rails3?
        params[:photo]
      else
        params.require(:photo).permit(:name)
      end
    end
def photo_params if Bread . rails3? params [ :photo ] else params . require ( :photo ) . permit ( :name ) end end
Only allow a trusted parameter "white list" through.
Only allow a trusted parameter " white list " through .