{"action":"created","issue":{"url":"https://api.github.com/repos/attr-encrypted/attr_encrypted/issues/73","labels_url":"https://api.github.com/repos/attr-encrypted/attr_encrypted/issues/73/labels{/name}","comments_url":"https://api.github.com/repos/attr-encrypted/attr_encrypted/issues/73/comments","events_url":"https://api.github.com/repos/attr-encrypted/attr_encrypted/issues/73/events","html_url":"https://github.com/attr-encrypted/attr_encrypted/issues/73","id":22979267,"number":73,"title":"AR methods issue when key is a proc","user":{"login":"cthulhu","id":43007,"avatar_url":"https://avatars.githubusercontent.com/u/43007?v=3","gravatar_id":"","url":"https://api.github.com/users/cthulhu","html_url":"https://github.com/cthulhu","followers_url":"https://api.github.com/users/cthulhu/followers","following_url":"https://api.github.com/users/cthulhu/following{/other_user}","gists_url":"https://api.github.com/users/cthulhu/gists{/gist_id}","starred_url":"https://api.github.com/users/cthulhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cthulhu/subscriptions","organizations_url":"https://api.github.com/users/cthulhu/orgs","repos_url":"https://api.github.com/users/cthulhu/repos","events_url":"https://api.github.com/users/cthulhu/events{/privacy}","received_events_url":"https://api.github.com/users/cthulhu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2013-11-20T09:13:21Z","updated_at":"2015-03-10T18:50:39Z","closed_at":null,"body":"Rails 4.0.1 \r\nMethods find_by_ raise an error if key is a Proc\r\n\r\nTypeError: no implicit conversion of Proc into String\r\n\r\nPartial Back-trace:\r\n\r\n    encryptor-1.1.3/lib/encryptor.rb:58:in `pkcs5_keyivgen'\r\n    encryptor-1.1.3/lib/encryptor.rb:58:in `crypt'\r\n    encryptor-1.1.3/lib/encryptor.rb:31:in `encrypt'\r\n    attr_encrypted-1.2.1/lib/attr_encrypted.rb:205:in `encrypt'\r\n    attr_encrypted-1.2.1/lib/attr_encrypted.rb:239:in `method_missing'\r\n    activerecord-4.0.1/lib/active_record/dynamic_matchers.rb:22:in `method_missing'\r\n    attr_encrypted-1.2.1/lib/attr_encrypted/adapters/active_record.rb:50:in `method_missing_with_attr_encrypted'\r\n    attr_encrypted-1.2.1/lib/attr_encrypted/adapters/active_record.rb:44:in `block in method_missing_with_attr_encrypted'\r\n    attr_encrypted-1.2.1/lib/attr_encrypted/adapters/active_record.rb:42:in `each'\r\n    attr_encrypted-1.2.1/lib/attr_encrypted/adapters/active_record.rb:42:in `each_with_index'\r\n    attr_encrypted-1.2.1/lib/attr_encrypted/adapters/active_record.rb:42:in `method_missing_with_attr_encrypted'\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/attr-encrypted/attr_encrypted/issues/comments/78121395","html_url":"https://github.com/attr-encrypted/attr_encrypted/issues/73#issuecomment-78121395","issue_url":"https://api.github.com/repos/attr-encrypted/attr_encrypted/issues/73","id":78121395,"user":{"login":"saghaulor","id":273862,"avatar_url":"https://avatars.githubusercontent.com/u/273862?v=3","gravatar_id":"","url":"https://api.github.com/users/saghaulor","html_url":"https://github.com/saghaulor","followers_url":"https://api.github.com/users/saghaulor/followers","following_url":"https://api.github.com/users/saghaulor/following{/other_user}","gists_url":"https://api.github.com/users/saghaulor/gists{/gist_id}","starred_url":"https://api.github.com/users/saghaulor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saghaulor/subscriptions","organizations_url":"https://api.github.com/users/saghaulor/orgs","repos_url":"https://api.github.com/users/saghaulor/repos","events_url":"https://api.github.com/users/saghaulor/events{/privacy}","received_events_url":"https://api.github.com/users/saghaulor/received_events","type":"User","site_admin":false},"created_at":"2015-03-10T18:50:39Z","updated_at":"2015-03-10T18:50:39Z","body":"@brandoncc you appear to be reporting two separate issues. I'll address the issue relevant to this ticket.\r\n\r\nCan you please include a sample of the code that you're using to pass a key to attr_encrypted?"}}