Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

partner_friendly

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

partner_friendly

  • 1.0.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

PartnerFriendly

Are you a marketer? PartnerFriendly is for you.

When savvy users register for applications, they append their email with strings like "+yourapp" preceding their domain.

Users do this to identify your organization if they receive unsolicited email from one of your marketing partners, such as a co-branded newsletter.

PartnerFriendly neutralizes this issue by removing such identifiers, transforming

Before Validation ---> After Validation

upon entry to your database.

Installation

Add to your application's Gemfile:

gem 'partner_friendly'

Then execute:

$ bundle

Or install it yourself as:

$ gem install partner_friendly

Usage

In your User model, add:

...
    before_validation :clean
...
    def clean
        PartnerFriendly::Process.clean(self)
    end

FAQ

The user may try to trick the system with multiple identifiers,

Multiple Identifier Example

however this just yields:

After Validation

ProTip: opting for before_save or before_create instead of before_validation may throw a nasty database error:

PG Unique Violation

In this case, simply rescue from the error with a redirect or existing authentication flash for "user already exists."

Contributing

Bug reports and pull requests are welcome.

  1. Fork it ( http://github.com/ryanckulp/partnerfriendly/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 new Pull Request

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 19 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc