Hobo Tutorial
Aim of this page is a "cheat-sheet" for the Agility tutorial, with my modifications.
Generate a basic app using Hobo
- sudo gem source -a http://gems.rubyforge.org
- hobo MyApp; cd MyApp
- ./script/generate hobo_migration
- ./script/server; create user and login
- ./script/generate hobo_model_resource Organism name:string binomial:string
- ./script/generate hobo_model_resource Enzyme name:string organism_id:integer (organism:references doesn't work)
- Edit app/models; Organism has_many :enzymes, Enzyme belongs_to :organism
- ./script/generate hobo_migration
Refresh web page. Should now have basic CRUD forms for Organism + Enzyme, with correct associations.
Extras
Nested resources + routes
- Edit enzymes_controller: auto_actions_for :organism, [:create, :new]
- Edit viewhints/organism_hints.rb: children :enzymes
Can now view and add enzymes for an organism.





