set activerecord whitelist_attributes to true

This commit is contained in:
Nihad Abbasov 2012-09-26 11:17:17 -07:00
parent 4629cc44d6
commit 83efcabc82
28 changed files with 100 additions and 44 deletions

View file

@ -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
#