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

seofy

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

seofy

  • 0.1.6
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Seofy

A simple plugin make permalink for you records.

Note: only supprt Rails 3

travis-ci

Installation

gem install seofy

Rails 3

gem 'seofy'

Usage

# existing_column adapter
class User < ActiveRecord::Base 
  seofy :source => :name, :adapter => :existing_column, :adapter_option => {:column => :slug}    
end

# base36 adapter
class Store < ActiveRecord::Base 
  seofy :source => :title, :adapter => :base36, :adapter_option => {:length => 3, :column => :slug }
end

User.for_seofy("a-name-slug")

for_seofy_with_short_url will support get record only use slug

User.for_seofy_with_short_url("slug")
User.for_seofy_with_short_url("a-name-slug")

and we won't override to_param method, we create new one seofy_param

user = User.create(:name => "I am allen", :slug => "abc") user.seofy_param #=> "i-am-allen-abc"

Rake task

rake seofy:update_all MODELS=User,Store

rake seofy:update_null MODELS=User,Store

FAQs

Package last updated on 23 Nov 2011

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