shakespeare 0.3.2 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,6 +1,6 @@
1
1
  Wed Jun 2 2010
2
2
  - - - - - - - -
3
- - Added support for html_safe
3
+ - Removed to_param on URL
4
4
 
5
5
  Feb 15 2010
6
6
  - - - - - -
data/Rakefile CHANGED
@@ -25,7 +25,7 @@ begin
25
25
  require 'jeweler'
26
26
  Jeweler::Tasks.new do |s|
27
27
  s.name = "shakespeare"
28
- s.version = "0.3.2"
28
+ s.version = "0.3.4"
29
29
  s.author = "Paul Campbell"
30
30
  s.email = "paul@rslw.com"
31
31
  s.homepage = "http://www.github.com/paulca/shakespeare"
@@ -26,11 +26,11 @@ class Admin::PagesController < ApplicationController
26
26
  end
27
27
 
28
28
  def edit
29
- @page = Page.find_by_url(params[:id])
29
+ @page = Page.find(params[:id])
30
30
  end
31
31
 
32
32
  def update
33
- @page = Page.find_by_url(params[:id])
33
+ @page = Page.find(params[:id])
34
34
  if @page.update_attributes(params[:page])
35
35
  redirect_to admin_pages_path
36
36
  else
@@ -39,7 +39,7 @@ class Admin::PagesController < ApplicationController
39
39
  end
40
40
 
41
41
  def destroy
42
- @page = Page.find_by_url(params[:id])
42
+ @page = Page.find(params[:id])
43
43
  @page.destroy
44
44
  redirect_to admin_pages_path
45
45
  end
@@ -12,11 +12,6 @@ class Page < ActiveRecord::Base
12
12
  out.join(', ')
13
13
  end
14
14
 
15
- def to_param
16
- url.respond_to?(:html_safe) ? url.html_safe : url
17
-
18
- end
19
-
20
15
  def clean_url
21
16
  title.to_s.downcase.gsub(/[^a-z0-9\s]/, '').gsub(/\s/,'-')
22
17
  end
@@ -10,12 +10,14 @@
10
10
  <table>
11
11
  <tr>
12
12
  <th>Title</th>
13
+ <th>URL</th>
13
14
  <th>&nbsp;</th>
14
15
  </tr>
15
16
 
16
17
  <%- @pages.each do |page| -%>
17
18
  <tr>
18
19
  <td><%= page.title %> (<%= link_to "Edit", edit_admin_page_path(page) %>)</td>
20
+ <td><%= page.url %></td>
19
21
  <td><%= link_to "Delete", admin_page_path(page), :method => :delete %></td>
20
22
  </tr>
21
23
  <%- end -%>
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{shakespeare}
8
- s.version = "0.3.2"
8
+ s.version = "0.3.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Paul Campbell"]
@@ -2757,3 +2757,45 @@
2757
2757
  Page Update (0.1ms) UPDATE "pages" SET "updated_at" = '2010-06-02 09:15:47', "content" = 'I was Home Alone' WHERE "id" = 1
2758
2758
  Page Load (0.4ms) SELECT * FROM "pages" WHERE ("pages"."title" = 'Mr. MacAllister''s Christmas') LIMIT 1
2759
2759
  Page Load (0.4ms) SELECT * FROM "pages" WHERE ("pages"."url" = 'gutmann.ca') LIMIT 1
2760
+ SQL (0.2ms) select sqlite_version(*)
2761
+ SQL (0.4ms)  SELECT name
2762
+ FROM sqlite_master
2763
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2764
+ 
2765
+ SQL (2.6ms) DROP TABLE "pages"
2766
+ SQL (1.5ms) CREATE TABLE "pages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "url" varchar(255), "keywords" text, "description" text, "content" text, "created_at" datetime, "updated_at" datetime, "noindex" boolean, "nofollow" boolean, "canonical" varchar(255), "enable_canonical" boolean, "enable_keywords" boolean) 
2767
+ SQL (0.4ms)  SELECT name
2768
+ FROM sqlite_master
2769
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
2770
+ 
2771
+ SQL (0.2ms) SELECT version FROM "schema_migrations"
2772
+ Page Load (0.2ms) SELECT * FROM "pages" 
2773
+ Page Load (0.2ms) SELECT * FROM "pages" 
2774
+ Page Create (0.4ms) INSERT INTO "pages" ("canonical", "created_at", "title", "updated_at", "url", "enable_canonical", "content", "nofollow", "description", "noindex", "enable_keywords", "keywords") VALUES('http://hendersons.com', '2010-06-02 09:25:34', 'Harry and the Hendersons', '2010-06-02 09:25:34', '', 't', '', 't', '', 't', NULL, '80s, movie')
2775
+ Page Load (0.4ms) SELECT * FROM "pages" 
2776
+ Page Load (0.2ms) SELECT * FROM "pages" 
2777
+ Page Create (0.4ms) INSERT INTO "pages" ("canonical", "created_at", "title", "updated_at", "url", "enable_canonical", "content", "nofollow", "description", "noindex", "enable_keywords", "keywords") VALUES('', '2010-06-02 09:25:34', 'A test', '2010-06-02 09:25:34', 'home/show', 'f', '', 'f', '', 'f', NULL, '')
2778
+ Page Load (0.4ms) SELECT * FROM "pages" 
2779
+ Page Load (0.4ms) SELECT * FROM "pages" WHERE ("pages"."id" = 1) 
2780
+ Page Load (0.4ms) SELECT * FROM "pages" WHERE ("pages"."id" = 1) 
2781
+ Page Update (0.1ms) UPDATE "pages" SET "updated_at" = '2010-06-02 09:25:35', "title" = 'It worked!' WHERE "id" = 1
2782
+ Page Load (0.4ms) SELECT * FROM "pages" 
2783
+ Page Create (0.4ms) INSERT INTO "pages" ("canonical", "created_at", "title", "updated_at", "url", "enable_canonical", "content", "nofollow", "description", "noindex", "enable_keywords", "keywords") VALUES(NULL, '2010-06-02 09:25:35', 'Harry and the Hendersons', '2010-06-02 09:25:35', 'kundesmith.co.uk', NULL, NULL, NULL, NULL, NULL, NULL, NULL)
2784
+ Page Load (0.3ms) SELECT * FROM "pages" WHERE ("pages"."id" = 1) 
2785
+ Page Load (0.4ms) SELECT * FROM "pages" 
2786
+ Page Load (0.4ms) SELECT * FROM "pages" WHERE ("pages"."id" = 1) 
2787
+ Page Load (0.4ms) SELECT * FROM "pages" WHERE ("pages"."id" = 1) 
2788
+ Page Update (0.1ms) UPDATE "pages" SET "keywords" = '', "updated_at" = '2010-06-02 09:25:35', "title" = 'Three Men and a Baby', "content" = '', "nofollow" = 'f', "canonical" = '', "description" = '', "noindex" = 'f', "enable_canonical" = 'f' WHERE "id" = 1
2789
+ Page Load (0.4ms) SELECT * FROM "pages" 
2790
+ Page Create (0.4ms) INSERT INTO "pages" ("canonical", "created_at", "title", "updated_at", "url", "enable_canonical", "content", "nofollow", "description", "noindex", "enable_keywords", "keywords") VALUES(NULL, '2010-06-02 09:25:35', 'The Departed', '2010-06-02 09:25:35', 'kautzergoyette.name', NULL, NULL, NULL, NULL, NULL, NULL, NULL)
2791
+ Page Load (0.3ms) SELECT * FROM "pages" WHERE ("pages"."id" = 1) 
2792
+ Page Load (0.4ms) SELECT * FROM "pages" 
2793
+ Page Load (0.4ms) SELECT * FROM "pages" WHERE ("pages"."id" = 1) 
2794
+ Page Destroy (0.1ms) DELETE FROM "pages" WHERE "id" = 1
2795
+ Page Load (0.1ms) SELECT * FROM "pages" 
2796
+ Page Create (0.4ms) INSERT INTO "pages" ("canonical", "created_at", "title", "updated_at", "url", "enable_canonical", "content", "nofollow", "description", "noindex", "enable_keywords", "keywords") VALUES(NULL, '2010-06-02 09:25:35', 'Mr. MacAllister''s Christmas', '2010-06-02 09:25:35', 'gutmann.ca', NULL, NULL, NULL, NULL, NULL, NULL, NULL)
2797
+ Page Load (0.3ms) SELECT * FROM "pages" WHERE ("pages"."id" = 1) 
2798
+ Page Load (0.3ms) SELECT * FROM "pages" WHERE ("pages"."title" = 'Mr. MacAllister''s Christmas') LIMIT 1
2799
+ Page Update (0.1ms) UPDATE "pages" SET "updated_at" = '2010-06-02 09:25:35', "content" = 'I was Home Alone' WHERE "id" = 1
2800
+ Page Load (0.4ms) SELECT * FROM "pages" WHERE ("pages"."title" = 'Mr. MacAllister''s Christmas') LIMIT 1
2801
+ Page Load (0.4ms) SELECT * FROM "pages" WHERE ("pages"."url" = 'gutmann.ca') LIMIT 1
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shakespeare
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 2
10
- version: 0.3.2
9
+ - 4
10
+ version: 0.3.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Paul Campbell