
Security News
CISA’s 2025 SBOM Guidance Adds Hashes, Licenses, Tool Metadata, and Context
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Make your ActiveRecords SEO friendly.
Add this line to your application's Gemfile:
gem 'seoable'
Execute:
$ bundle
Run the install generator
:
$ rails generate seoable:install
The generator:
Override the defaults in config/initializers/seoable.rb
:
Seoable.configure do |config|
config.default_title = 'My app name'
config.default_description = 'The best app in the known universe'
config.sluggable_attributes = [:title, :headline]
end
Add include Seoable::ActsAsSeoable
to any ActiveRecord you want to make Seoable:
class Post < ActiveRecord::Base
include Seoable::ActsAsSeoable
end
In your application layout file (probably app/views/layouts/application.html.erb
):
Replace this line:
<title>ApplicationName</title>
With this line:
<title><%= seoable_title %></title>
Add the following line below <title>
:
<meta name="description" content="<%= seoable_description %>" />
If you’re adding seoable to existing app and want to generate SeoDetails for existing records, perform save for every model that includes ActsAsSeoable. You can do this from the console, runner or add a Rake task. For example:
Post.find_each(&:save)
If you see the error similar to column reference "id" is ambiguous
, it’s due to including seo_details
table through default_scope
. To fix this, specify table name in your queries, like this:
scope :only_big_ids, -> { where('"posts"."id" > 3') }
After checking out the repo, run bin/setup
to install dependencies. Then, run rspec
to run the tests.
To install the gem with your changes onto your local machine, run rake install
.
You’re more than welcome to send us pull-requests. Here’s the list of TODO items we’re looking to work on in the future:
Bug reports and pull requests are welcome on GitHub at https://github.com/DVELP/seoable. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
Seoable is copyright of DVELP Ltd. It is free software and available to distribute under the terms of the MIT License.
Seoable was created and is maintained by DVELP Ltd.
If you like what you see and would like to hire us or join us, get in touch!
FAQs
Unknown package
We found that seoable demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.