Simple Configurable Policy Presentation

Pretty much every site or service on the web has some form of policy document. As it stands, some companies seek legal counsel on what specific language is needed in their policy documents. Others simply find some document for free or cheap on the web and hope it’s good enough. It would be nice if developers had the option of using preset standard boilerplate legal documents. It would be even better if said standard documents could be configured to include or exclude specific clauses. This has “gem” written all over it. Here are some of my thoughts on how that might be best approached.

Note: this is intended for Rails developers, but the gem could be used for Rack and/or Sinatra, and the same high level idea conveys out beyond Rubyland.

RESTful Paths

GET /policy/security
GET /policy/privacy
GET /policy/terms_of_service

Pre-baked Routes

namespace 'policy' do
match 'privacy' => 'policy#privacy', :as => 'privacy_policy', :via => :get
match 'security' => 'policy#security', :as => 'security_policy', :via => :get
match 'terms_of_service' => 'policy#terms_of_service', :as => 'terms_of_service_policy', :via => :get

Configuration via Initializer

Specific details of each view (privacy, security, and terms of service) are provided in an initializer. If your service collects personal information from your users, you can include a parameter in the initializer for privacy policy to include a clause in the privacy view claiming your organization will not share that information for profit. If your service provides secure access, you can include a parameter in the initializer for the security policy to include a clause in the security view ensuring the integrity of your users’ data.

Policy.configure :privacy do |policy|
policy.personal_info { true }

Policy.configure :security do |policy|
policy.ssl { true }

Dynamic Views

Views will include static content in partials. Each partial will represent a clause of the contract or policy document. By using partials, the developer is free to add custom partials to suit situations where default standard clauses are inadequate for their specific needs.

To Be Continued

I don’t see anyone else working in this space, so I will take the initiative to build a first draft of this. I am not a lawyer, so I expect to be relying on my tech-friendly lawyer friends to help me out.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s