seo_meta 1.0.7 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/app/views/seo_meta/_form.html.erb +22 -0
- data/lib/seo_meta.rb +1 -3
- data/readme.md +10 -0
- metadata +3 -2
@@ -0,0 +1,22 @@
|
|
1
|
+
<h2><%= t('seo', :scope => 'seo_meta.form') %></h2>
|
2
|
+
<div class='field'>
|
3
|
+
<span class='label_with_help'>
|
4
|
+
<%= form.label :browser_title, t('seo_override_title', :scope => 'seo_meta.form') %>
|
5
|
+
<%= refinery_help_tag t('seo_override_title_help', :scope => 'seo_meta.form')%>
|
6
|
+
</span>
|
7
|
+
<%= form.text_field :browser_title, :class => 'widest' %>
|
8
|
+
</div>
|
9
|
+
<div class='field'>
|
10
|
+
<span class='label_with_help'>
|
11
|
+
<%= form.label :meta_keywords, t('meta_keywords_title', :scope => 'seo_meta.form') %>
|
12
|
+
<%= refinery_help_tag t('meta_keywords_help', :scope => 'seo_meta.form') %>
|
13
|
+
</span>
|
14
|
+
<%= form.text_field :meta_keywords, :class => 'widest' %>
|
15
|
+
</div>
|
16
|
+
<div class='field'>
|
17
|
+
<span class='label_with_help'>
|
18
|
+
<%= form.label :meta_description, t('meta_description_title', :scope => 'seo_meta.form') %>
|
19
|
+
<%= refinery_help_tag t('meta_description_help', :scope => 'seo_meta.form') %>
|
20
|
+
</span>
|
21
|
+
<%= form.text_area :meta_description, :class => 'widest', :rows => 7 %>
|
22
|
+
</div>
|
data/lib/seo_meta.rb
CHANGED
@@ -34,9 +34,7 @@ def is_seo_meta(options = {})
|
|
34
34
|
self.send :include, ::SeoMeta::InstanceMethods
|
35
35
|
extend ::SeoMeta::ClassMethods
|
36
36
|
|
37
|
-
# Ensure seo_meta is
|
38
|
-
# And ensure that seo_meta is saved after the model is saved.
|
39
|
-
before_save :build_seo_meta_tags
|
37
|
+
# Ensure that seo_meta is saved after the model is saved.
|
40
38
|
after_save :save_meta_tags!
|
41
39
|
|
42
40
|
# Delegate both the accessor and setters for the fields to :seo_meta
|
data/readme.md
CHANGED
@@ -94,6 +94,16 @@ Now, run:
|
|
94
94
|
|
95
95
|
rake db:migrate
|
96
96
|
|
97
|
+
## Form Partial
|
98
|
+
|
99
|
+
You can use the included partial if you want a ready made form for the new SEO fields.
|
100
|
+
Note that the `:form` local variable is required and should be a form builder object
|
101
|
+
from a `form_for` block, for example:
|
102
|
+
|
103
|
+
<%= form_for @page do |f| -%>
|
104
|
+
<%= render :partial => '/seo_meta/form', :locals => { :form => f } %>
|
105
|
+
<% end %>
|
106
|
+
|
97
107
|
## Anything else?
|
98
108
|
|
99
109
|
Nope, all done!
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: seo_meta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.0
|
5
|
+
version: 1.1.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Philip Arndt
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-05-
|
13
|
+
date: 2011-05-19 00:00:00 +12:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -40,6 +40,7 @@ files:
|
|
40
40
|
- lib/tasks/seo_meta.rake
|
41
41
|
- db/migrate/1_create_seo_meta.rb
|
42
42
|
- app/models/seo_metum.rb
|
43
|
+
- app/views/seo_meta/_form.html.erb
|
43
44
|
- license.md
|
44
45
|
- readme.md
|
45
46
|
has_rdoc: true
|