seo_fuel 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -45,10 +45,14 @@ Display the edit button and the form on every page, by including these commands
45
45
  <%= edit_seo_button %>
46
46
  <%= edit_seo_dialog %>
47
47
 
48
+ ### Setting default values
49
+ By default, all titles are blank. If a title is blank, the one specified in `seo_fuel_settings.yml` should be used (NOT YET IMPLEMENTED). Per template, you can specify a default value by adding a line of code to your view template:
50
+
51
+ <% default_title("Site Name | #{@article.title}") %>
52
+
48
53
 
49
54
  ## TODO
50
55
  This gem is in early development, there are still some things to do:
51
- - add system for default values (<% default_title(@article.title) %> for example)
52
56
  - add options for open_graph
53
57
  - add documentation
54
58
  - include testing
@@ -10,7 +10,7 @@ class SeoTagsController < ApplicationController
10
10
  end
11
11
 
12
12
  def update
13
- @tag = SeoTag.find_or_create_by_path(params[:path])
13
+ @tag = SeoTag.find_or_create_by_path(params[:seo_tag][:path])
14
14
  @tag.update_attributes(params[:seo_tag])
15
15
  respond_to do |format|
16
16
  format.js
@@ -2,7 +2,7 @@
2
2
  <%= form_for SeoTag.find_or_initialize_by_path(request.path), remote: true, html: {class: "seo_form"} do |f|%>
3
3
  <%= f.hidden_field :path %>
4
4
  <%= f.label :title, "#{I18n.t('seo.form.title')}".html_safe %>
5
- <%= f.text_field :title %>
5
+ <%= f.text_field :title, placeholder: @default_title %>
6
6
  <div class="spacer"></div>
7
7
  <%= f.label :description, "#{I18n.t('seo.form.description')}".html_safe %>
8
8
  <%= f.text_area :description, rows: 3 %>
@@ -1,3 +1,3 @@
1
1
  module SeoFuel
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seo_fuel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: