johnyerhot / mia

Mia is yet another Ruby framework built upon Rack, Haml, and DataMapper.

This URL has Read+Write access

mia /
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.