Permalink
Browse files

add html safe support

  • Loading branch information...
1 parent f6d48b5 commit b23a08cf7a3d705b40255f03c06fd19353de57ed @paulca committed Jun 2, 2010
Showing with 18 additions and 2 deletions.
  1. +4 −0 CHANGELOG
  2. +1 −1 Rakefile
  3. +2 −1 app/models/page.rb
  4. +11 −0 features/admin_pages.feature
View
@@ -1,3 +1,7 @@
+Wed Jun 2 2010
+- - - - - - - -
+- Added support for html_safe
+
Feb 15 2010
- - - - - -
- Added find_by_url to pages
View
@@ -25,7 +25,7 @@ begin
require 'jeweler'
Jeweler::Tasks.new do |s|
s.name = "shakespeare"
- s.version = "0.3.1"
+ s.version = "0.3.2"
s.author = "Paul Campbell"
s.email = "paul@rslw.com"
s.homepage = "http://www.github.com/paulca/shakespeare"
View
@@ -13,7 +13,8 @@ def robots
end
def to_param
- url
+ url.respond_to?(:html_safe) ? url.html_safe : url
+
end
def clean_url
@@ -18,6 +18,17 @@ Feature: Managing Pages
And I fill in "Canonical URL" with "http://hendersons.com"
And I press "Save"
Then I should see "Harry and the Hendersons"
+
+ Scenario: Page with 'something/something' URL
+ Given I am on the pages admin page
+ When I follow "Add a New Page"
+ And I fill in "URL" with "home/show"
+ And I fill in "Title" with "A test"
+ And I press "Save"
+ And I follow "Edit"
+ And I fill in "Title" with "It worked!"
+ And I press "Save"
+ Then I should see "It worked!"
Scenario: Edit Page
Given a page titled "Harry and the Hendersons"

0 comments on commit b23a08c

Please sign in to comment.