Permalink
Browse files

Miscellaneous cleanup.

Make `events_controller#index.txt` use html_safe so things like ampersands don’t get mangled in plain text format.

Remove empty helpers.

Update doc that Ruby 1.9.2 is required now.

Strip unnecessary comments left over from generators.
  • Loading branch information...
1 parent 2d28a22 commit 881dfe9dc3fac69cb66d6278a3fb26b737bbefc3 @grantneufeld committed May 8, 2012
View
@@ -26,7 +26,7 @@ Doing this as a fresh project so I can experiment and get it right before rollin
=== Prerequisites
-You must have ruby installed (at least version 1.8.7).
+You must have ruby installed (at least version 1.9.2).
Make sure your ruby gem system is up to date:
> sudo gem update --system
@@ -1,2 +0,0 @@
-module AuthoritiesHelper
-end
@@ -1,2 +0,0 @@
-module DocumentsHelper
-end
@@ -1,2 +0,0 @@
-module EventsHelper
-end
@@ -1,3 +0,0 @@
-# encoding: utf-8
-module ExternalLinksHelper
-end
@@ -1,2 +0,0 @@
-module PagesHelper
-end
@@ -1,2 +0,0 @@
-module PathsHelper
-end
@@ -1,2 +0,0 @@
-module SessionsHelper
-end
@@ -1,2 +0,0 @@
-module SettingsHelper
-end
@@ -1,2 +0,0 @@
-module UsersHelper
-end
@@ -1,2 +0,0 @@
-module VersionsHelper
-end
@@ -43,7 +43,7 @@ date_idx = nil
end
- %><%= event.title %>
+ %><%= event.title.html_safe %>
<%
event_location = event.location
@@ -66,30 +66,30 @@ date_idx = nil
end
if event_location.present?
- %> <%= event.location %><%
+ %> <%= event.location.html_safe %><%
if event_address.present?
- %> (<%= event_address %>)<%
+ %> (<%= event_address.html_safe %>)<%
end
%>
<% elsif event_address.present?
- %> <%= event_address %>
+ %> <%= event_address.html_safe %>
<% end
if event.description?
# compress linebreaks and insert double space at beginning of each line
- %><%= event.description.gsub(/[\r\n]+/, "\n").gsub(/^/, ' ') %>
+ %><%= event.description.gsub(/[\r\n]+/, "\n").gsub(/^/, ' ').html_safe %>
<%
end
event_organizer = event.organizer
if event_organizer.present?
- %> Presented by <%= event_organizer %>.
+ %> Presented by <%= event_organizer.html_safe %>.
<% end
%>
- <%= event_url(event) %>
+ <%= event_url(event).html_safe %>
<%
end
@@ -1,14 +0,0 @@
-require 'spec_helper'
-
-# Specs in this file have access to a helper object that includes
-# the AuthoritiesHelper. For example:
-#
-# describe AuthoritiesHelper do
-# describe "string concat" do
-# it "concats two strings with spaces" do
-# helper.concat_strings("this","that").should == "this that"
-# end
-# end
-# end
-#describe AuthoritiesHelper do
-#end
@@ -1,15 +0,0 @@
-require 'spec_helper'
-
-# Specs in this file have access to a helper object that includes
-# the DocumentsHelper. For example:
-#
-# describe DocumentsHelper do
-# describe "string concat" do
-# it "concats two strings with spaces" do
-# helper.concat_strings("this","that").should == "this that"
-# end
-# end
-# end
-#describe DocumentsHelper do
-# pending "add some examples to (or delete) #{__FILE__}"
-#end
@@ -1 +0,0 @@
-require 'spec_helper'
@@ -1,15 +0,0 @@
-require 'spec_helper'
-
-# Specs in this file have access to a helper object that includes
-# the ExternalLinksHelper. For example:
-#
-# describe ExternalLinksHelper do
-# describe "string concat" do
-# it "concats two strings with spaces" do
-# helper.concat_strings("this","that").should == "this that"
-# end
-# end
-# end
-#describe ExternalLinksHelper do
-# pending "add some examples to (or delete) #{__FILE__}"
-#end
@@ -1,14 +0,0 @@
-require 'spec_helper'
-
-# Specs in this file have access to a helper object that includes
-# the PagesHelper. For example:
-#
-# describe PagesHelper do
-# describe "string concat" do
-# it "concats two strings with spaces" do
-# helper.concat_strings("this","that").should == "this that"
-# end
-# end
-# end
-#describe PagesHelper do
-#end
@@ -1,15 +0,0 @@
-require 'spec_helper'
-
-# Specs in this file have access to a helper object that includes
-# the PathsHelper. For example:
-#
-# describe PathsHelper do
-# describe "string concat" do
-# it "concats two strings with spaces" do
-# helper.concat_strings("this","that").should == "this that"
-# end
-# end
-# end
-#describe PathsHelper do
-# pending "add some examples to (or delete) #{__FILE__}"
-#end
@@ -1,14 +0,0 @@
-require 'spec_helper'
-
-# Specs in this file have access to a helper object that includes
-# the SessionsHelper. For example:
-#
-# describe SessionsHelper do
-# describe "string concat" do
-# it "concats two strings with spaces" do
-# helper.concat_strings("this","that").should == "this that"
-# end
-# end
-# end
-#describe SessionsHelper do
-#end
@@ -1,15 +0,0 @@
-require 'spec_helper'
-
-# Specs in this file have access to a helper object that includes
-# the SettingsHelper. For example:
-#
-# describe SettingsHelper do
-# describe "string concat" do
-# it "concats two strings with spaces" do
-# helper.concat_strings("this","that").should == "this that"
-# end
-# end
-# end
-#describe SettingsHelper do
-# pending "add some examples to (or delete) #{__FILE__}"
-#end
@@ -1,13 +0,0 @@
-require 'spec_helper'
-
-# Specs in this file have access to a helper object that includes
-# the UsersHelper. For example:
-# describe UsersHelper do
-# describe "string concat" do
-# it "concats two strings with spaces" do
-# helper.concat_strings("this","that").should == "this that"
-# end
-# end
-# end
-#describe UsersHelper do
-#end
@@ -1,14 +0,0 @@
-require 'spec_helper'
-
-# Specs in this file have access to a helper object that includes
-# the VersionsHelper. For example:
-#
-# describe VersionsHelper do
-# describe "string concat" do
-# it "concats two strings with spaces" do
-# helper.concat_strings("this","that").should == "this that"
-# end
-# end
-# end
-#describe VersionsHelper do
-#end
@@ -11,7 +11,6 @@
it "renders the edit setting form" do
render
- # Run the generator again with the --webrat flag if you want to use webrat matchers
assert_select "form", :action => settings_path(@setting), :method => "post" do
assert_select "input#setting_key", :name => "setting[key]"
assert_select "textarea#setting_value", :name => "setting[value]"
@@ -11,7 +11,6 @@
it "renders new setting form" do
render
- # Run the generator again with the --webrat flag if you want to use webrat matchers
assert_select "form", :action => settings_path, :method => "post" do
assert_select "input#setting_key", :name => "setting[key]"
assert_select "textarea#setting_value", :name => "setting[value]"
@@ -10,9 +10,7 @@
it "renders attributes in <p>" do
render
- # Run the generator again with the --webrat flag if you want to use webrat matchers
rendered.should match(/Key/)
- # Run the generator again with the --webrat flag if you want to use webrat matchers
rendered.should match(/MyText/)
end
end

0 comments on commit 881dfe9

Please sign in to comment.