Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only works on a single field per model #1

Closed
theIntuitionist opened this issue Oct 9, 2009 · 1 comment
Closed

Only works on a single field per model #1

theIntuitionist opened this issue Oct 9, 2009 · 1 comment

Comments

@theIntuitionist
Copy link

This code:

class User < ActiveRecord::Base
encrypt_with_public_key :first_name, :symmetric => :never, :base64 => true, :public_key => File.join(RAILS_ROOT,'config','public.pem')
encrypt_with_public_key :last_name, :symmetric => :never, :base64 => true, :public_key => File.join(RAILS_ROOT,'config','public.pem')
end

results in

User.create(:first_name => 'jason', :last_name => 'ward)
=> #<User id: 2, first_name: nil, last_name: "pMLj/Sa87FgR6mV1et8Hbo6F/eTI/efSgb6qenVVegNVUMEyjz9...", created_at: "2009-10-09 05:05:55", updated_at: "2009-10-09 05:05:55">

@spikex
Copy link
Owner

spikex commented Oct 9, 2009

This was fixed in version 0.2.0 (0.2.1 is current). However, github gems have been broken since their move to Rackspace, so they haven't updated their copy. You can get the current version from Gemcutter or RubyForge.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants