-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.txt
36 lines (19 loc) · 1.1 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Tommy The Rails 3 Engine is a simple Rails 3 engine.
Finding information about how to build Engines for Rails 3 has been difficult.
This engine demonstrates:
* simple MVC engine behaviour
* copying of static assets into host Rails app
* the generation of a migration into host app
* expressing engine gem dependencies in the host app (see below).
Unfortunately, there doesn't seem to be a way to dynamically load Gemfiles. It would be ideal if the tommy_station Gemfile could load the Gemfile or (Gemfile.lock) which is bundled in the Tommy gem. For now, I set a dependency in Jeweler and then require whatever library I need in lib/tommy/engine. See the dependency on Inherited Resources.
INSTALL
Clone the project from github.
rake install
gem install pkg/tommy-0.1.gem
cd into tommy_station (the Rails 3 host app).
bundle install
rake generate tommy
rails server
Then visit http://localhost:3000/messages/new
CREDIT
Most of this was written by following The Modest Rubyist at http://www.themodestrubyist.com/2010/03/01/rails-3-plugins---part-1---the-big-picture/ and looking through Devise source code.