Displaying 1 result from an estimated 1 matches for "mystuffcontroller".
Did you mean:
  mystuff_controller
  
2009 Jul 12
11
get DB data to rhtml file
...ta out of a database to my rhtml file. The files
look like this:
Model
-------
mystuff.rb
class Mystuff < ActiveRecord::Base
  set_table_name "mytable"
  set_primary_key "id"
end
Controllers
--------------
mystuff_controller.rb
require ''Mystuff''
class MystuffController < ApplicationController
    def read
       @me =  Mystuff.find( :all)
    end
  end
Index
----------
Index.html.erb
<h1>Mystuff#index</h1>
<p><%mystuff.each do |mr|%></p>
<h1>mr.m1</h1>
<% end %>
Thanks for you help on yet another stupid...