Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

refactor helpers

  • Loading branch information...
commit 3b20e017368b50650f3567e3aae55732b0cd51f4 1 parent 407ec9b
Bryan Goines bry4n authored
10 app/helpers/application_helper.rb
View
@@ -1,19 +1,11 @@
module ApplicationHelper
- TAGLINES = %w{
- fast-version-control
- everything-is-local
- distributed-even-if-your-workflow-isnt
- local-branching-on-the-cheap
- distributed-is-the-new-centralized
- }
-
def partial(part)
render part
end
def random_tagline
- "<em>--</em>#{TAGLINES.sample}"
+ content_tag(:em, '-' * 2) + TAGLINES.sample
end
def latest_version
4 app/helpers/doc_helper.rb
View
@@ -1,7 +1,9 @@
module DocHelper
+
def man(name)
- "<a href=\"/docs/#{name}\">#{name.gsub('git-', '')}</a>".html_safe
+ link_to name.gsub('git-', ''), doc_file_path(:file => name)
end
+
def linkify(content, section)
next_page = section.next_slug
prev_page = section.prev_slug
9 lib/constants.rb
View
@@ -1,3 +1,12 @@
+# ApplicationHelper
+TAGLINES = %w{
+ fast-version-control
+ everything-is-local
+ distributed-even-if-your-workflow-isnt
+ local-branching-on-the-cheap
+ distributed-is-the-new-centralized
+}
+
# DocsController#commands
CMD_GROUPS = [
['Setup and Config', [ 'config', 'help' ]],
0  test/unit/helpers/appliaction_helper_test.rb → test/unit/helpers/application_helper_test.rb
View
File renamed without changes
Please sign in to comment.
Something went wrong with that request. Please try again.