diff options
| author | Nihad Abbasov <narkoz.2008@gmail.com> | 2012-09-26 11:17:17 -0700 |
|---|---|---|
| committer | Nihad Abbasov <narkoz.2008@gmail.com> | 2012-09-26 11:18:35 -0700 |
| commit | 83efcabc829083f11553df0f1eb67a8fbbc3e000 (patch) | |
| tree | 2017dc24ab9630ad9a227dffde27550ededcc92f /app/models/web_hook.rb | |
| parent | 4629cc44d6b7fa7ebdec8ce47bb0825e255d7763 (diff) | |
| download | gitlab-ce-83efcabc829083f11553df0f1eb67a8fbbc3e000.tar.gz | |
set activerecord whitelist_attributes to true
Diffstat (limited to 'app/models/web_hook.rb')
| -rw-r--r-- | app/models/web_hook.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/models/web_hook.rb b/app/models/web_hook.rb index 76efa50198b..5d826d2fb6d 100644 --- a/app/models/web_hook.rb +++ b/app/models/web_hook.rb @@ -1,6 +1,8 @@ class WebHook < ActiveRecord::Base include HTTParty + attr_accessible :url + # HTTParty timeout default_timeout 10 @@ -18,11 +20,11 @@ class WebHook < ActiveRecord::Base post_url = url.gsub(parsed_url.userinfo+"@", "") WebHook.post(post_url, body: data.to_json, - headers: { "Content-Type" => "application/json" }, + headers: { "Content-Type" => "application/json" }, basic_auth: {username: parsed_url.user, password: parsed_url.password}) end end - + end # == Schema Information # |
