Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
83 lines (77 sloc) 2.8 KB
diff --git a/app/helpers/pages_helper.rb b/app/helpers/pages_helper.rb
index d4b23b8..646c42d 100644
--- a/app/helpers/pages_helper.rb
+++ b/app/helpers/pages_helper.rb
@@ -2,16 +2,16 @@ module PagesHelper
def wikified_body(body)
r = RedCloth.new(body)
- r.gsub!(/\[\[(.*)\]\]/) {wiki_link($1)}
+ r.gsub!(/\[\[(.*)(\|(.*))?\]\]/) {wiki_link(*$1.split("|"))}
r.to_html
end
- def wiki_link(wiki_words)
+ def wiki_link(wiki_words, link_text = nil)
permalink = wiki_words.downcase.gsub(' ', '-')
if Page.exists?(:permalink => permalink)
- link_to wiki_words, wiki_page_url(permalink)
+ link_to ((link_text || wiki_words), wiki_page_url(permalink))
else
- link_to wiki_words, wiki_page_url(permalink), :class => "new_wiki_link"
+ link_to ((link_text || wiki_words), wiki_page_url(permalink), :class => "new_wiki_link")
end
end
diff --git a/config/database.yml.example b/config/database.yml.example
deleted file mode 100644
index fa75aa4..0000000
--- a/config/database.yml.example
+++ /dev/null
@@ -1,31 +0,0 @@
-# MySQL (default setup). Versions 4.1 and 5.0 are recommended.
-#
-# Install the MySQL driver:
-# gem install mysql
-# On MacOS X:
-# gem install mysql -- --include=/usr/local/lib
-# On Windows:
-# gem install mysql
-# Choose the win32 build.
-# Install MySQL and put its /bin directory on your path.
-#
-# And be sure to use new-style password hashing:
-# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
-#
-development:
- adapter: sqlite3
- database: db/development.db
-
-test:
- adapter: sqlite3
- database: ":memory:"
- verbosity: silent
-
-production:
- adapter: mysql
- encoding: utf8
- database: signal_production
- username: CHANGEME
- password: CHANGEME
- host: localhost
-
diff --git a/db/schema.rb b/db/schema.rb
index 6324ac8..598d487 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -1,6 +1,13 @@
-# This file is autogenerated. Instead of editing this file, please use the
-# migrations feature of ActiveRecord to incrementally modify your database, and
+# This file is auto-generated from the current state of the database. Instead of editing this file,
+# please use the migrations feature of ActiveRecord to incrementally modify your database, and
# then regenerate this schema definition.
+#
+# Note that this schema.rb definition is the authoritative source for your database schema. If you need
+# to create the application database on another system, you should be using db:schema:load, not running
+# all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations
+# you'll amass, the slower it'll run and the greater likelihood for issues).
+#
+# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 10) do