Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Rails integration.

We have a Rails engine now so that our images can be added to
the asset pipeline. We added those images, and also modified
the links in the lessons to point to the right place.
  • Loading branch information...
commit 89f53d8c5fd054aea9abde83cf5fbc285b7e8e97 1 parent 3ade8e7
@steveklabnik steveklabnik authored
View
12 content/a-tour-of-hackety-hack.md
@@ -51,7 +51,7 @@ games, and a few other things.
That's all there really is to say about the homepage. Try opening the Editor.
Here's its icon:
-![Not this one, silly! the one on the left!](static/tab-new.png)
+![Not this one, silly! the one on the left!](/assets/tab-new.png)
## Editor
@@ -83,7 +83,7 @@ off to other Hackety Hackers. :) More about this when we talk about Preferences.
The next tab is the Help tab. It looks like this:
-![Not this one, silly! the one on the left!](static/tab-help.png)
+![Not this one, silly! the one on the left!](/assets/tab-help.png)
Click it, and it'll open up a new window. Browse around and come back, I'll be
here.
@@ -101,7 +101,7 @@ there's a lot! Luckily, there's also a much shorter cheat sheet too...
Peek at the Cheat Sheet by clicking the icon like this:
-![Not this one, silly! the one on the left!](static/tab-cheat.png)
+![Not this one, silly! the one on the left!](/assets/tab-cheat.png)
The Cheat Sheet is much simpler. It just contains some helpful bits that you
should find useful. A quick reference of often used bits. And a short sheet
@@ -115,7 +115,7 @@ The classic About box. These have been around basically since the beginning of
time. It's just a fun little image that tells you what version of Hackety Hack
you're using. It'll change with every release.
-![Not this one, silly! the one on the left!](static/tab-hand.png)
+![Not this one, silly! the one on the left!](/assets/tab-hand.png)
Time for the last one...
@@ -125,7 +125,7 @@ Time for the last one...
The Preferences icon is towards the bottom, and looks like this:
-![Not this one, silly! the one on the left!](static/tab-properties.png)
+![Not this one, silly! the one on the left!](/assets/tab-properties.png)
This lets you adjust your preferences for Hackety Hack. Right now, there's only
one preference: linking Hackety with your account on
@@ -144,7 +144,7 @@ If you did click the quit icon, well, you wouldn't be here anymore. And that'd
be unfortunate. So, don't click it until you're good and ready. When it's your
time to go, it'll be there waiting for you.
-![Not this one, silly! the one on the left!](static/tab-quit.png)
+![Not this one, silly! the one on the left!](/assets/tab-quit.png)
Come back soon!
View
2  content/an-introduction-to-programming.md
@@ -121,7 +121,7 @@ the turtle isn't doing what you expect!
Click on the editor tab to get started:
-![Not this one, silly! the one on the left!](static/tab-new.png)
+![Not this one, silly! the one on the left!](/assets/tab-new.png)
### Type it in!
View
4 content/an-introduction-to-ruby-with-hackety-hack.md
@@ -26,7 +26,7 @@ _Ruby_ was created by
(you can just call him Matz) in 1995. If you couldn't guess, Matz is from
Japan. Here he is:
-![](static/matz.jpg)
+![](/assets/matz.jpg)
### Ruby is enjoyable
@@ -51,7 +51,7 @@ screen. Otherwise, you won't know what's going on!
In order to start coding, we need to bring up the Editor. Its icon looks like
this:
-![Not this one, silly! the one on the left!](static/tab-new.png)
+![Not this one, silly! the one on the left!](/assets/tab-new.png)
Click the icon to open the Editor up, and then we'll move on...
View
6 lib/hackety_hack/lessons.rb
@@ -1,4 +1,6 @@
require 'hackety_hack/lessons/version'
+require 'hackety_hack/lessons/rails/engine' if defined?(Rails)
+
require 'metadown'
module HacketyHack
@@ -26,5 +28,9 @@ def find_by_slug(slug)
def all
FILE_LIST.collect{|file| Metadown.render(File.read(file)) }
end
+
+ def static_directory
+ "#{File.dirname(__FILE__)}/../../static"
+ end
end
end
View
8 lib/hackety_hack/lessons/rails/engine.rb
@@ -0,0 +1,8 @@
+module HacketyHack
+ module Lessons
+ module Rails
+ class Engine < ::Rails::Engine
+ end
+ end
+ end
+end
View
BIN  vendor/assets/images/matz.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  vendor/assets/images/tab-cheat.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  vendor/assets/images/tab-hand.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  vendor/assets/images/tab-help.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  vendor/assets/images/tab-new.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  vendor/assets/images/tab-properties.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  vendor/assets/images/tab-quit.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Please sign in to comment.
Something went wrong with that request. Please try again.