This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Bruno Azisaka Maciel (author)
Sat Dec 06 21:57:32 -0800 2008
| name | age | message | |
|---|---|---|---|
| |
README.mkdn | ||
| |
db/ | ||
| |
init.rb | Wed Nov 19 14:03:01 -0800 2008 | |
| |
install.rb | Wed Nov 19 13:19:30 -0800 2008 | |
| |
lib/ | ||
| |
test/ | Sat Dec 06 21:50:39 -0800 2008 | |
| |
uninstall.rb | Fri Nov 14 11:33:02 -0800 2008 |
README.mkdn
Acts as SEO
The Acts the SEO is a plugin created to facilitate the management of Meta Tags.
Installing
Plugin
To install the plugin run on root folder of your application:
script/plugin install git://github.com/dookie/acts_as_seo.git
This process will create a new migration create_seo_estructure.rb on db/migrate.
So execute rake db:migrate to create the table metatags in your data base.
ActiveRecord
Open the model that you want to add the acts_as_seo and add act_as_seo there, with the example:
class Page < ActiveRecord::Base
acts_as_seo
end
ActionView
To manage your tags add these fields in your forms:
<p>
<%= f.label :metatag_title %>
<%= f.metatag_title %>
</p>
<p>
<%= f.label :metatag_keywords %>
<%= f.metatag_keywords %>
</p>
<p>
<%= f.label :metatag_description %>
<%= f.metatag_description %>
</p>
This will generate the following HTML:
<p>
<label for="page_metatag_title">Metatag title</label>
<input id="page_metatag_title" name="page[metatag_title]" size="30" type="text" />
</p>
<p>
<label for="page_metatag_keywords">Metatag keywords</label>
<input id="page_metatag_keywords" name="page[metatag_keywords]" size="30" type="text" />
</p>
<p>
<label for="page_metatag_description">Metatag description</label>
<textarea cols="40" id="page_metatag_description" name="page[metatag_description]" rows="20"></textarea>
</p>
In your views do:








