johnyerhot / mia
- Source
- Commits
- Network (0)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
john (author)
Thu Sep 10 13:25:53 -0700 2009
mia /
| name | age | message | |
|---|---|---|---|
| |
LICENSE | ||
| |
README | ||
| |
config/ | ||
| |
controllers/ | ||
| |
lib/ | ||
| |
migrate.rb | ||
| |
models/ | ||
| |
public/ | ||
| |
start.rb | ||
| |
views/ |
README
== Mia - another Ruby Framework - version 0.0.1 Mia is a simple web framework written in Ruby. Right now, it's just a project of mine. Mia uses a couple other projects for functionality: *Views - strictly Haml people http://haml.hamptoncatlin.com/ *Models - strictly DataMapper people http://www.datamapper.org/ == Requirements * Rack - gem install rack * Mongrel - gem install mongrel * Ruby 1.8.6 * HAML 2+ - gem install haml * DataMapper - gem install dm-core == What the hell? Controllers (throw them in the controller directory) inherit from Mia::Controller. You can use the before method to have a method run before everything else. class test < Mia::Controller def go(params) before :do_action @person = Person.get(params['id']) render "go.html.haml" end private def do_action puts "Action Did!" end end # in /views/test/go.html.haml = @person.inspect Now, fire up the your app $ ruby start.rb -p8080 and browse to localhost:8080/test/go and you should see your views's content.

