meta_manager 0.0.8 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +9 -1
- data/lib/meta_manager.rb +5 -2
- data/lib/meta_manager/model.rb +27 -0
- data/lib/meta_manager/models/active_record/meta_tag.rb +8 -0
- data/lib/meta_manager/models/mongoid/meta_tag.rb +16 -0
- data/lib/meta_manager/orm/active_record.rb +2 -0
- data/lib/meta_manager/orm/mongoid.rb +2 -0
- data/lib/meta_manager/version.rb +1 -1
- data/test/dummy/config/database.yml +22 -0
- data/test/dummy/config/initializers/meta_manager.rb +2 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +241 -0
- metadata +50 -6
- data/app/models/meta_tag.rb +0 -23
data/README.rdoc
CHANGED
@@ -6,8 +6,16 @@ Enable meta tags in your model
|
|
6
6
|
|
7
7
|
gem "meta_manager"
|
8
8
|
|
9
|
+
ActiveRecord:
|
10
|
+
|
11
|
+
require 'meta_manager/orm/active_record'
|
12
|
+
|
9
13
|
rake meta_manager_engine:install:migrations
|
10
14
|
|
15
|
+
Mongoid:
|
16
|
+
|
17
|
+
require 'meta_manager/orm/mongoid'
|
18
|
+
|
11
19
|
== Usage
|
12
20
|
|
13
21
|
class Category < ActiveRecord::Base
|
@@ -90,4 +98,4 @@ Action show:
|
|
90
98
|
|
91
99
|
rake test
|
92
100
|
|
93
|
-
Copyright (c)
|
101
|
+
Copyright (c) 2012 Fodojo, released under the MIT license
|
data/lib/meta_manager.rb
CHANGED
@@ -1,7 +1,10 @@
|
|
1
|
-
require '
|
2
|
-
require '
|
1
|
+
require 'active_support/concern'
|
2
|
+
require 'orm_adapter'
|
3
3
|
|
4
4
|
module MetaManager
|
5
|
+
autoload :Taggable, "meta_manager/taggable"
|
6
|
+
autoload :Helper, "meta_manager/helper"
|
7
|
+
autoload :Model, "meta_manager/model"
|
5
8
|
end
|
6
9
|
|
7
10
|
require 'meta_manager/engine'
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module MetaManager
|
2
|
+
module Model
|
3
|
+
extend ::ActiveSupport::Concern
|
4
|
+
|
5
|
+
included do
|
6
|
+
validates_presence_of :name, :taggable_type, :content
|
7
|
+
validates_uniqueness_of :name, :scope => [:taggable_type, :taggable_id, :is_dynamic]
|
8
|
+
|
9
|
+
attr_accessible :name, :content, :is_dynamic
|
10
|
+
end
|
11
|
+
|
12
|
+
def get_content(controller=nil)
|
13
|
+
self.is_dynamic ? dynamic_content(controller) : self.content
|
14
|
+
end
|
15
|
+
|
16
|
+
def dynamic_content(controller)
|
17
|
+
self.content.gsub /%{([\w\.]+)}/ do
|
18
|
+
items = $1.split('.')
|
19
|
+
instance_name = items.shift
|
20
|
+
method_name = items.join('.')
|
21
|
+
record = controller.instance_variable_get("@#{instance_name}")
|
22
|
+
|
23
|
+
record.try(:"#{method_name}")
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'mongoid'
|
2
|
+
|
3
|
+
class MetaTag
|
4
|
+
include Mongoid::Document
|
5
|
+
include Mongoid::Timestamps
|
6
|
+
include MetaManager::Model
|
7
|
+
|
8
|
+
# Columns
|
9
|
+
field :name, :type => String
|
10
|
+
field :content, :type => String
|
11
|
+
field :is_dynamic, :type => Boolean
|
12
|
+
|
13
|
+
index({:name => 1})
|
14
|
+
|
15
|
+
belongs_to :taggable, :polymorphic => true, :index => true
|
16
|
+
end
|
data/lib/meta_manager/version.rb
CHANGED
@@ -0,0 +1,22 @@
|
|
1
|
+
# SQLite version 3.x
|
2
|
+
# gem install sqlite3
|
3
|
+
development:
|
4
|
+
adapter: sqlite3
|
5
|
+
database: db/development.sqlite3
|
6
|
+
pool: 5
|
7
|
+
timeout: 5000
|
8
|
+
|
9
|
+
# Warning: The database defined as "test" will be erased and
|
10
|
+
# re-generated from your development database when you run "rake".
|
11
|
+
# Do not set this db to the same as development or production.
|
12
|
+
test:
|
13
|
+
adapter: sqlite3
|
14
|
+
database: db/test.sqlite3
|
15
|
+
pool: 5
|
16
|
+
timeout: 5000
|
17
|
+
|
18
|
+
production:
|
19
|
+
adapter: sqlite3
|
20
|
+
database: db/production.sqlite3
|
21
|
+
pool: 5
|
22
|
+
timeout: 5000
|
Binary file
|
@@ -0,0 +1,241 @@
|
|
1
|
+
Connecting to database specified by database.yml
|
2
|
+
Connecting to database specified by database.yml
|
3
|
+
Connecting to database specified by database.yml
|
4
|
+
[1m[36m (0.2ms)[0m [1mselect sqlite_version(*)[0m
|
5
|
+
[1m[35m (9.1ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
6
|
+
[1m[36m (0.1ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
7
|
+
[1m[35m (3.5ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
8
|
+
[1m[36m (0.2ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
9
|
+
Migrating to CreateMetaTags (20120105114018)
|
10
|
+
[1m[35m (0.1ms)[0m begin transaction
|
11
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "meta_tags" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(50) NOT NULL, "content" text, "is_dynamic" boolean DEFAULT 'f', "taggable_id" integer NOT NULL, "taggable_type" varchar(50) NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
12
|
+
[1m[35m (0.1ms)[0m PRAGMA index_list("meta_tags")
|
13
|
+
[1m[36m (0.2ms)[0m [1mCREATE INDEX "index_meta_tags_on_name" ON "meta_tags" ("name")[0m
|
14
|
+
[1m[35m (0.1ms)[0m PRAGMA index_list("meta_tags")
|
15
|
+
[1m[36m (0.1ms)[0m [1mPRAGMA index_info('index_meta_tags_on_name')[0m
|
16
|
+
[1m[35m (0.2ms)[0m CREATE INDEX "index_meta_tags_on_taggable_type_and_taggable_id" ON "meta_tags" ("taggable_type", "taggable_id")
|
17
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20120105114018')[0m
|
18
|
+
[1m[35m (4.7ms)[0m commit transaction
|
19
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
20
|
+
Migrating to CreateCategories (20111226131910)
|
21
|
+
[1m[35m (0.1ms)[0m begin transaction
|
22
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "categories" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
23
|
+
[1m[35m (0.3ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ('20111226131910')
|
24
|
+
[1m[36m (6.0ms)[0m [1mcommit transaction[0m
|
25
|
+
Migrating to CreatePosts (20111226131911)
|
26
|
+
[1m[35m (0.1ms)[0m begin transaction
|
27
|
+
[1m[36m (0.5ms)[0m [1mCREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "content" text, "notes" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
28
|
+
[1m[35m (0.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ('20111226131911')
|
29
|
+
[1m[36m (12.5ms)[0m [1mcommit transaction[0m
|
30
|
+
[1m[35m (0.1ms)[0m begin transaction
|
31
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
32
|
+
[1m[35m (0.1ms)[0m begin transaction
|
33
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
34
|
+
[1m[35mMetaTag Exists (0.3ms)[0m SELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1
|
35
|
+
[1m[36mMetaTag Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1[0m
|
36
|
+
[1m[35mMetaTag Exists (0.1ms)[0m SELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'keywords' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1
|
37
|
+
[1m[36mMetaTag Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'keywords' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1[0m
|
38
|
+
[1m[35mSQL (1.8ms)[0m INSERT INTO "categories" ("created_at", "title", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["title", "Test category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
39
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "meta_tags" ("content", "created_at", "is_dynamic", "name", "taggable_id", "taggable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["content", "title content"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["is_dynamic", false], ["name", "title"], ["taggable_id", 1], ["taggable_type", "Category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
40
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "meta_tags" ("content", "created_at", "is_dynamic", "name", "taggable_id", "taggable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["content", "keywords content"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["is_dynamic", false], ["name", "keywords"], ["taggable_id", 1], ["taggable_type", "Category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
41
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
42
|
+
[1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 1]]
|
43
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
44
|
+
[1m[35m (0.1ms)[0m begin transaction
|
45
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
46
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "categories" ("created_at", "title", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["title", "Test category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
47
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
48
|
+
[1m[35mCategory Load (0.1ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 1]]
|
49
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "meta_tags" WHERE "meta_tags"."taggable_id" = 1 AND "meta_tags"."taggable_type" = 'Category'[0m
|
50
|
+
[1m[35mMetaTag Load (0.1ms)[0m SELECT "meta_tags".* FROM "meta_tags" WHERE "meta_tags"."taggable_id" = 1 AND "meta_tags"."taggable_type" = 'Category'
|
51
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
52
|
+
[1m[35m (0.1ms)[0m begin transaction
|
53
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
54
|
+
[1m[35m (0.0ms)[0m begin transaction
|
55
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "meta_tags" [0m
|
56
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
57
|
+
[1m[36mMetaTag Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1[0m
|
58
|
+
[1m[35mMetaTag Exists (0.1ms)[0m SELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1
|
59
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "categories" ("created_at", "title", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["title", "Test category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
60
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "meta_tags" ("content", "created_at", "is_dynamic", "name", "taggable_id", "taggable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["content", "title content"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["is_dynamic", false], ["name", "title"], ["taggable_id", 1], ["taggable_type", "Category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
61
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
62
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "meta_tags"
|
63
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
64
|
+
[1m[35m (0.0ms)[0m begin transaction
|
65
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
66
|
+
[1m[35m (0.1ms)[0m begin transaction
|
67
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
68
|
+
[1m[35m (0.0ms)[0m begin transaction
|
69
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
70
|
+
[1m[35m (0.1ms)[0m begin transaction
|
71
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
72
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "meta_tags" ("content", "created_at", "is_dynamic", "name", "taggable_id", "taggable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["content", "some content"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["is_dynamic", false], ["name", "test"], ["taggable_id", 1], ["taggable_type", "Category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
73
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
74
|
+
[1m[35mMetaTag Exists (0.2ms)[0m SELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'test' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" = 1 AND "meta_tags"."is_dynamic" = 't') LIMIT 1
|
75
|
+
[1m[36mMetaTag Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'test' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" = 1 AND "meta_tags"."is_dynamic" = 't') LIMIT 1[0m
|
76
|
+
[1m[35m (0.2ms)[0m rollback transaction
|
77
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
78
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
79
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "meta_tags" ("content", "created_at", "is_dynamic", "name", "taggable_id", "taggable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["content", "some content"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["is_dynamic", false], ["name", "test"], ["taggable_id", 1], ["taggable_type", "Category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
80
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
81
|
+
[1m[36mMetaTag Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'test' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" = 2 AND "meta_tags"."is_dynamic" = 'f') LIMIT 1[0m
|
82
|
+
[1m[35mMetaTag Exists (0.1ms)[0m SELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'test' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" = 2 AND "meta_tags"."is_dynamic" = 'f') LIMIT 1
|
83
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
84
|
+
[1m[35m (0.1ms)[0m begin transaction
|
85
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
86
|
+
[1m[35mMetaTag Exists (0.2ms)[0m SELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'somename' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" = 1 AND "meta_tags"."is_dynamic" = 'f') LIMIT 1
|
87
|
+
[1m[36mMetaTag Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'somename' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" = 1 AND "meta_tags"."is_dynamic" = 'f') LIMIT 1[0m
|
88
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "meta_tags" ("content", "created_at", "is_dynamic", "name", "taggable_id", "taggable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["content", "some content"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["is_dynamic", false], ["name", "somename"], ["taggable_id", 1], ["taggable_type", "Category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
89
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
90
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
91
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
92
|
+
[1m[35mMetaTag Exists (0.3ms)[0m SELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" IS NULL AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" = 1 AND "meta_tags"."is_dynamic" = 'f') LIMIT 1
|
93
|
+
[1m[36mMetaTag Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" IS NULL AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" = 1 AND "meta_tags"."is_dynamic" = 'f') LIMIT 1[0m
|
94
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
95
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
96
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
97
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "meta_tags" ("content", "created_at", "is_dynamic", "name", "taggable_id", "taggable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["content", "some content"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["is_dynamic", false], ["name", "test"], ["taggable_id", 1], ["taggable_type", "Category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
98
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
99
|
+
[1m[36mMetaTag Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'test' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" = 1 AND "meta_tags"."is_dynamic" = 'f') LIMIT 1[0m
|
100
|
+
[1m[35mMetaTag Exists (0.2ms)[0m SELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'test' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" = 1 AND "meta_tags"."is_dynamic" = 'f') LIMIT 1
|
101
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
102
|
+
[1m[35m (0.1ms)[0m begin transaction
|
103
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
104
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "meta_tags" ("content", "created_at", "is_dynamic", "name", "taggable_id", "taggable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["content", "some content"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["is_dynamic", true], ["name", "somename"], ["taggable_id", 1], ["taggable_type", "Category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
105
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
106
|
+
[1m[35mMetaTag Exists (0.2ms)[0m SELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'somename' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" = 1 AND "meta_tags"."is_dynamic" = 't') LIMIT 1
|
107
|
+
[1m[36mMetaTag Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'somename' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" = 1 AND "meta_tags"."is_dynamic" = 't') LIMIT 1[0m
|
108
|
+
[1m[35m (0.2ms)[0m rollback transaction
|
109
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
110
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
111
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
112
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
113
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
114
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
115
|
+
[1m[36mMetaTag Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1[0m
|
116
|
+
[1m[35mMetaTag Exists (0.1ms)[0m SELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1
|
117
|
+
[1m[36mMetaTag Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'keywords' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1[0m
|
118
|
+
[1m[35mMetaTag Exists (0.1ms)[0m SELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'keywords' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1
|
119
|
+
[1m[36mMetaTag Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'description' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1[0m
|
120
|
+
[1m[35mMetaTag Exists (0.1ms)[0m SELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'description' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1
|
121
|
+
[1m[36mMetaTag Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'og:title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1[0m
|
122
|
+
[1m[35mMetaTag Exists (0.1ms)[0m SELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'og:title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1
|
123
|
+
[1m[36mMetaTag Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 't') LIMIT 1[0m
|
124
|
+
[1m[35mMetaTag Exists (0.1ms)[0m SELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 't') LIMIT 1
|
125
|
+
[1m[36mMetaTag Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'og:title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 't') LIMIT 1[0m
|
126
|
+
[1m[35mMetaTag Exists (0.1ms)[0m SELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'og:title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 't') LIMIT 1
|
127
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "categories" ("created_at", "title", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["title", "Test category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
128
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "meta_tags" ("content", "created_at", "is_dynamic", "name", "taggable_id", "taggable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["content", "test title"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["is_dynamic", false], ["name", "title"], ["taggable_id", 1], ["taggable_type", "Category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
129
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "meta_tags" ("content", "created_at", "is_dynamic", "name", "taggable_id", "taggable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["content", "test, keywords"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["is_dynamic", false], ["name", "keywords"], ["taggable_id", 1], ["taggable_type", "Category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
130
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "meta_tags" ("content", "created_at", "is_dynamic", "name", "taggable_id", "taggable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["content", "test description"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["is_dynamic", false], ["name", "description"], ["taggable_id", 1], ["taggable_type", "Category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
131
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "meta_tags" ("content", "created_at", "is_dynamic", "name", "taggable_id", "taggable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["content", "category og:title"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["is_dynamic", false], ["name", "og:title"], ["taggable_id", 1], ["taggable_type", "Category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
132
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "meta_tags" ("content", "created_at", "is_dynamic", "name", "taggable_id", "taggable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["content", "title %{post.title}, content %{post.content}, notes %{post.notes}"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["is_dynamic", true], ["name", "title"], ["taggable_id", 1], ["taggable_type", "Category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
133
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "meta_tags" ("content", "created_at", "is_dynamic", "name", "taggable_id", "taggable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["content", "dynamic og:title - %{post.title}"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["is_dynamic", true], ["name", "og:title"], ["taggable_id", 1], ["taggable_type", "Category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
134
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
135
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
136
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "posts" ("content", "created_at", "notes", "title", "updated_at") VALUES (?, ?, ?, ?, ?) [["content", "test_content"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["notes", "test_notes"], ["title", "test_title"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
137
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
138
|
+
Processing by PostsController#index as HTML
|
139
|
+
[1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories" LIMIT 1
|
140
|
+
Rendered posts/index.html.erb within layouts/application (3.0ms)
|
141
|
+
[1m[36mMetaTag Load (0.3ms)[0m [1mSELECT "meta_tags".* FROM "meta_tags" WHERE "meta_tags"."taggable_id" = 1 AND "meta_tags"."taggable_type" = 'Category'[0m
|
142
|
+
Completed 200 OK in 106ms (Views: 103.7ms | ActiveRecord: 0.5ms)
|
143
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
144
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
145
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
146
|
+
[1m[36mMetaTag Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1[0m
|
147
|
+
[1m[35mMetaTag Exists (0.1ms)[0m SELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1
|
148
|
+
[1m[36mMetaTag Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'keywords' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1[0m
|
149
|
+
[1m[35mMetaTag Exists (0.1ms)[0m SELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'keywords' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1
|
150
|
+
[1m[36mMetaTag Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'description' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1[0m
|
151
|
+
[1m[35mMetaTag Exists (0.1ms)[0m SELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'description' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1
|
152
|
+
[1m[36mMetaTag Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'og:title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1[0m
|
153
|
+
[1m[35mMetaTag Exists (0.1ms)[0m SELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'og:title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1
|
154
|
+
[1m[36mMetaTag Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 't') LIMIT 1[0m
|
155
|
+
[1m[35mMetaTag Exists (0.1ms)[0m SELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 't') LIMIT 1
|
156
|
+
[1m[36mMetaTag Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'og:title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 't') LIMIT 1[0m
|
157
|
+
[1m[35mMetaTag Exists (0.1ms)[0m SELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'og:title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 't') LIMIT 1
|
158
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "categories" ("created_at", "title", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["title", "Test category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
159
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "meta_tags" ("content", "created_at", "is_dynamic", "name", "taggable_id", "taggable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["content", "test title"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["is_dynamic", false], ["name", "title"], ["taggable_id", 1], ["taggable_type", "Category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
160
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "meta_tags" ("content", "created_at", "is_dynamic", "name", "taggable_id", "taggable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["content", "test, keywords"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["is_dynamic", false], ["name", "keywords"], ["taggable_id", 1], ["taggable_type", "Category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
161
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "meta_tags" ("content", "created_at", "is_dynamic", "name", "taggable_id", "taggable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["content", "test description"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["is_dynamic", false], ["name", "description"], ["taggable_id", 1], ["taggable_type", "Category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
162
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "meta_tags" ("content", "created_at", "is_dynamic", "name", "taggable_id", "taggable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["content", "category og:title"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["is_dynamic", false], ["name", "og:title"], ["taggable_id", 1], ["taggable_type", "Category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
163
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "meta_tags" ("content", "created_at", "is_dynamic", "name", "taggable_id", "taggable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["content", "title %{post.title}, content %{post.content}, notes %{post.notes}"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["is_dynamic", true], ["name", "title"], ["taggable_id", 1], ["taggable_type", "Category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
164
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "meta_tags" ("content", "created_at", "is_dynamic", "name", "taggable_id", "taggable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["content", "dynamic og:title - %{post.title}"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["is_dynamic", true], ["name", "og:title"], ["taggable_id", 1], ["taggable_type", "Category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
165
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
166
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
167
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "posts" ("content", "created_at", "notes", "title", "updated_at") VALUES (?, ?, ?, ?, ?) [["content", "test_content"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["notes", "test_notes"], ["title", "test_title"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
168
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
169
|
+
Processing by PostsController#show as HTML
|
170
|
+
Parameters: {"id"=>"1"}
|
171
|
+
[1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories" LIMIT 1
|
172
|
+
[1m[36mPost Load (0.2ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1[0m [["id", "1"]]
|
173
|
+
[1m[35mMetaTag Load (0.3ms)[0m SELECT "meta_tags".* FROM "meta_tags" WHERE "meta_tags"."taggable_id" = 1 AND "meta_tags"."taggable_type" = 'Category'
|
174
|
+
Completed 200 OK in 8ms (Views: 4.7ms | ActiveRecord: 0.6ms)
|
175
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
176
|
+
[1m[35m (0.1ms)[0m begin transaction
|
177
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
178
|
+
[1m[35mMetaTag Exists (0.2ms)[0m SELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1
|
179
|
+
[1m[36mMetaTag Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1[0m
|
180
|
+
[1m[35mMetaTag Exists (0.1ms)[0m SELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'keywords' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1
|
181
|
+
[1m[36mMetaTag Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'keywords' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1[0m
|
182
|
+
[1m[35mMetaTag Exists (0.1ms)[0m SELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'description' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1
|
183
|
+
[1m[36mMetaTag Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'description' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1[0m
|
184
|
+
[1m[35mMetaTag Exists (0.1ms)[0m SELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'og:title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1
|
185
|
+
[1m[36mMetaTag Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'og:title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1[0m
|
186
|
+
[1m[35mMetaTag Exists (0.1ms)[0m SELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 't') LIMIT 1
|
187
|
+
[1m[36mMetaTag Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 't') LIMIT 1[0m
|
188
|
+
[1m[35mMetaTag Exists (0.1ms)[0m SELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'og:title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 't') LIMIT 1
|
189
|
+
[1m[36mMetaTag Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'og:title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 't') LIMIT 1[0m
|
190
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "categories" ("created_at", "title", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["title", "Test category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
191
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "meta_tags" ("content", "created_at", "is_dynamic", "name", "taggable_id", "taggable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["content", "test title"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["is_dynamic", false], ["name", "title"], ["taggable_id", 1], ["taggable_type", "Category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
192
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "meta_tags" ("content", "created_at", "is_dynamic", "name", "taggable_id", "taggable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["content", "test, keywords"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["is_dynamic", false], ["name", "keywords"], ["taggable_id", 1], ["taggable_type", "Category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
193
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "meta_tags" ("content", "created_at", "is_dynamic", "name", "taggable_id", "taggable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["content", "test description"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["is_dynamic", false], ["name", "description"], ["taggable_id", 1], ["taggable_type", "Category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
194
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "meta_tags" ("content", "created_at", "is_dynamic", "name", "taggable_id", "taggable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["content", "category og:title"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["is_dynamic", false], ["name", "og:title"], ["taggable_id", 1], ["taggable_type", "Category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
195
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "meta_tags" ("content", "created_at", "is_dynamic", "name", "taggable_id", "taggable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["content", "title %{post.title}, content %{post.content}, notes %{post.notes}"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["is_dynamic", true], ["name", "title"], ["taggable_id", 1], ["taggable_type", "Category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
196
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "meta_tags" ("content", "created_at", "is_dynamic", "name", "taggable_id", "taggable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["content", "dynamic og:title - %{post.title}"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["is_dynamic", true], ["name", "og:title"], ["taggable_id", 1], ["taggable_type", "Category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
197
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
198
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
199
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "posts" ("content", "created_at", "notes", "title", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["content", "test_content"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["notes", "test_notes"], ["title", "test_title"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
200
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
201
|
+
Processing by PostsController#show as HTML
|
202
|
+
Parameters: {"id"=>"1"}
|
203
|
+
[1m[36mCategory Load (0.2ms)[0m [1mSELECT "categories".* FROM "categories" LIMIT 1[0m
|
204
|
+
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "1"]]
|
205
|
+
[1m[36mMetaTag Load (0.2ms)[0m [1mSELECT "meta_tags".* FROM "meta_tags" WHERE "meta_tags"."taggable_id" = 1 AND "meta_tags"."taggable_type" = 'Category'[0m
|
206
|
+
Completed 200 OK in 5ms (Views: 3.0ms | ActiveRecord: 0.5ms)
|
207
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
208
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
209
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
210
|
+
[1m[36mMetaTag Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1[0m
|
211
|
+
[1m[35mMetaTag Exists (0.1ms)[0m SELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1
|
212
|
+
[1m[36mMetaTag Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'keywords' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1[0m
|
213
|
+
[1m[35mMetaTag Exists (0.1ms)[0m SELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'keywords' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1
|
214
|
+
[1m[36mMetaTag Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'description' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1[0m
|
215
|
+
[1m[35mMetaTag Exists (0.1ms)[0m SELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'description' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1
|
216
|
+
[1m[36mMetaTag Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'og:title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1[0m
|
217
|
+
[1m[35mMetaTag Exists (0.1ms)[0m SELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'og:title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 'f') LIMIT 1
|
218
|
+
[1m[36mMetaTag Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 't') LIMIT 1[0m
|
219
|
+
[1m[35mMetaTag Exists (0.1ms)[0m SELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 't') LIMIT 1
|
220
|
+
[1m[36mMetaTag Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'og:title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 't') LIMIT 1[0m
|
221
|
+
[1m[35mMetaTag Exists (0.1ms)[0m SELECT 1 AS one FROM "meta_tags" WHERE ("meta_tags"."name" = 'og:title' AND "meta_tags"."taggable_type" = 'Category' AND "meta_tags"."taggable_id" IS NULL AND "meta_tags"."is_dynamic" = 't') LIMIT 1
|
222
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "categories" ("created_at", "title", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["title", "Test category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
223
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "meta_tags" ("content", "created_at", "is_dynamic", "name", "taggable_id", "taggable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["content", "test title"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["is_dynamic", false], ["name", "title"], ["taggable_id", 1], ["taggable_type", "Category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
224
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "meta_tags" ("content", "created_at", "is_dynamic", "name", "taggable_id", "taggable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["content", "test, keywords"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["is_dynamic", false], ["name", "keywords"], ["taggable_id", 1], ["taggable_type", "Category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
225
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "meta_tags" ("content", "created_at", "is_dynamic", "name", "taggable_id", "taggable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["content", "test description"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["is_dynamic", false], ["name", "description"], ["taggable_id", 1], ["taggable_type", "Category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
226
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "meta_tags" ("content", "created_at", "is_dynamic", "name", "taggable_id", "taggable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["content", "category og:title"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["is_dynamic", false], ["name", "og:title"], ["taggable_id", 1], ["taggable_type", "Category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
227
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "meta_tags" ("content", "created_at", "is_dynamic", "name", "taggable_id", "taggable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["content", "title %{post.title}, content %{post.content}, notes %{post.notes}"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["is_dynamic", true], ["name", "title"], ["taggable_id", 1], ["taggable_type", "Category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
228
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "meta_tags" ("content", "created_at", "is_dynamic", "name", "taggable_id", "taggable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["content", "dynamic og:title - %{post.title}"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["is_dynamic", true], ["name", "og:title"], ["taggable_id", 1], ["taggable_type", "Category"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
229
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
230
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
231
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "posts" ("content", "created_at", "notes", "title", "updated_at") VALUES (?, ?, ?, ?, ?) [["content", "test_content"], ["created_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00], ["notes", "test_notes"], ["title", "test_title"], ["updated_at", Sat, 05 Jan 2013 21:59:37 UTC +00:00]]
|
232
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
233
|
+
Processing by PostsController#index as HTML
|
234
|
+
[1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories" LIMIT 1
|
235
|
+
[1m[36mMetaTag Load (0.2ms)[0m [1mSELECT "meta_tags".* FROM "meta_tags" WHERE "meta_tags"."taggable_id" = 1 AND "meta_tags"."taggable_type" = 'Category'[0m
|
236
|
+
Completed 200 OK in 5ms (Views: 3.2ms | ActiveRecord: 0.4ms)
|
237
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
238
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
239
|
+
Processing by WelcomeController#index as HTML
|
240
|
+
Completed 200 OK in 4ms (Views: 3.7ms | ActiveRecord: 0.0ms)
|
241
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: meta_manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,16 +9,16 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-01-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
15
|
+
name: orm_adapter
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
21
|
+
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,39 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: activerecord
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: 3.0.0
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 3.0.0
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: mongoid
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
30
62
|
- !ruby/object:Gem::Dependency
|
31
63
|
name: sqlite3
|
32
64
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,21 +98,27 @@ executables: []
|
|
66
98
|
extensions: []
|
67
99
|
extra_rdoc_files: []
|
68
100
|
files:
|
69
|
-
- app/models/meta_tag.rb
|
70
101
|
- db/migrate/20120105114018_create_meta_tags.rb
|
71
102
|
- lib/meta_manager/version.rb
|
72
103
|
- lib/meta_manager/engine.rb
|
73
104
|
- lib/meta_manager/helper.rb
|
74
105
|
- lib/meta_manager/taggable.rb
|
106
|
+
- lib/meta_manager/models/mongoid/meta_tag.rb
|
107
|
+
- lib/meta_manager/models/active_record/meta_tag.rb
|
108
|
+
- lib/meta_manager/model.rb
|
109
|
+
- lib/meta_manager/orm/mongoid.rb
|
110
|
+
- lib/meta_manager/orm/active_record.rb
|
75
111
|
- lib/meta_manager.rb
|
76
112
|
- lib/tasks/meta_manager_tasks.rake
|
77
113
|
- MIT-LICENSE
|
78
114
|
- Rakefile
|
79
115
|
- README.rdoc
|
80
116
|
- test/meta_manager_test.rb
|
117
|
+
- test/dummy/db/test.sqlite3
|
81
118
|
- test/dummy/db/migrate/20111226131910_create_categories.rb
|
82
119
|
- test/dummy/db/migrate/20111226131911_create_posts.rb
|
83
120
|
- test/dummy/config.ru
|
121
|
+
- test/dummy/log/test.log
|
84
122
|
- test/dummy/app/assets/stylesheets/application.css
|
85
123
|
- test/dummy/app/assets/javascripts/application.js
|
86
124
|
- test/dummy/app/helpers/application_helper.rb
|
@@ -101,8 +139,10 @@ files:
|
|
101
139
|
- test/dummy/config/environments/development.rb
|
102
140
|
- test/dummy/config/environments/production.rb
|
103
141
|
- test/dummy/config/environments/test.rb
|
142
|
+
- test/dummy/config/database.yml
|
104
143
|
- test/dummy/config/initializers/inflections.rb
|
105
144
|
- test/dummy/config/initializers/secret_token.rb
|
145
|
+
- test/dummy/config/initializers/meta_manager.rb
|
106
146
|
- test/dummy/config/initializers/wrap_parameters.rb
|
107
147
|
- test/dummy/config/initializers/mime_types.rb
|
108
148
|
- test/dummy/config/initializers/backtrace_silencers.rb
|
@@ -144,9 +184,11 @@ specification_version: 3
|
|
144
184
|
summary: Head meta tags manager for models.
|
145
185
|
test_files:
|
146
186
|
- test/meta_manager_test.rb
|
187
|
+
- test/dummy/db/test.sqlite3
|
147
188
|
- test/dummy/db/migrate/20111226131910_create_categories.rb
|
148
189
|
- test/dummy/db/migrate/20111226131911_create_posts.rb
|
149
190
|
- test/dummy/config.ru
|
191
|
+
- test/dummy/log/test.log
|
150
192
|
- test/dummy/app/assets/stylesheets/application.css
|
151
193
|
- test/dummy/app/assets/javascripts/application.js
|
152
194
|
- test/dummy/app/helpers/application_helper.rb
|
@@ -167,8 +209,10 @@ test_files:
|
|
167
209
|
- test/dummy/config/environments/development.rb
|
168
210
|
- test/dummy/config/environments/production.rb
|
169
211
|
- test/dummy/config/environments/test.rb
|
212
|
+
- test/dummy/config/database.yml
|
170
213
|
- test/dummy/config/initializers/inflections.rb
|
171
214
|
- test/dummy/config/initializers/secret_token.rb
|
215
|
+
- test/dummy/config/initializers/meta_manager.rb
|
172
216
|
- test/dummy/config/initializers/wrap_parameters.rb
|
173
217
|
- test/dummy/config/initializers/mime_types.rb
|
174
218
|
- test/dummy/config/initializers/backtrace_silencers.rb
|
data/app/models/meta_tag.rb
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
class MetaTag < ::ActiveRecord::Base
|
2
|
-
belongs_to :taggable, :polymorphic => true
|
3
|
-
|
4
|
-
validates_presence_of :name, :taggable_type, :content
|
5
|
-
validates_uniqueness_of :name, :scope => [:taggable_type, :taggable_id, :is_dynamic]
|
6
|
-
|
7
|
-
attr_accessible :name, :content, :is_dynamic
|
8
|
-
|
9
|
-
def get_content(controller=nil)
|
10
|
-
self.is_dynamic ? dynamic_content(controller) : self.content
|
11
|
-
end
|
12
|
-
|
13
|
-
def dynamic_content(controller)
|
14
|
-
self.content.gsub /%{([\w\.]+)}/ do
|
15
|
-
items = $1.split('.')
|
16
|
-
instance_name = items.shift
|
17
|
-
method_name = items.join('.')
|
18
|
-
record = controller.instance_variable_get("@#{instance_name}")
|
19
|
-
|
20
|
-
record.try(:"#{method_name}")
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|