No commit activity in last 3 years
No release in over 3 years
Encrypted form fields for Rails
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0
~> 1.3
~> 1.6
>= 0

Runtime

 Project Readme

EncryptedFormFields

Encrypted form fields for Rails apps.

Build Status Gem Version

Installation

Add this line to your application's Gemfile:

gem 'encrypted_form_fields'

And then execute:

$ bundle

Or install it yourself as:

$ gem install encrypted_form_fields

Usage

Configure necessary encryption keys in Rails initializer:

EncryptedFormFields.secret_key_base = # your secret key base
EncryptedFormFields.secret_token = # your secret token

Create encrypted inputs in your view:


<%= form_for(user) do |f| %>
  <%= f.encrypted_field :secrets %>
  <%= encrypted_field_tag :field_name, "secret data" %>
<% end %>

Then access the data in controller:

class SomeController
  def create
    # do stuff...
    encrypted_params # This will contain values of encrypted parameters
    # do stuff...
  end
end

Contributing

  1. Fork it ( http://github.com/lautis/encrypted_form_fields/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request