Last active
October 27, 2016 02:16
Revisions
-
smd686s revised this gist
Aug 23, 2013 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,8 @@ require 'rack/test' require 'action_controller/metal/strong_parameters' # https://github.com/rails/rails/blob/master/actionpack/test/controller/parameters/parameters_require_test.rb module Application class API < Grape::API -
smd686s revised this gist
Aug 23, 2013 . 2 changed files with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1 +1 @@ gem "actionpack", "~> 4.0.0" 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 charactersOriginal file line number Diff line number Diff line change @@ -15,4 +15,4 @@ def item_params Item.new item_params end end end -
smd686s revised this gist
Aug 23, 2013 . 1 changed file with 16 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,2 +1,18 @@ require 'rack/test' require 'action_controller/metal/strong_parameters' module Application class API < Grape::API helpers do def item_params ActionController::Parameters.new(params).require(:item).permit(:attribute) end end desc "Create an item." post :items do Item.new item_params end end end -
smd686s created this gist
Aug 23, 2013 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ gem "actionpack", "~> 4.0.0" 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,2 @@ require 'rack/test' require 'action_controller/metal/strong_parameters'