You'll need a config/database.yml file with the right config e.g.
Code yaml:
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
A model file in app/models/telephone_record.rb
Code ruby:
class TelephoneRecord < ActiveRecord::Base
end
Then within a controller action you can get all the records like so
Code ruby:
def index
@telephone_records = TelephoneRecord.all
end
And render them in your views.
If this isn't making sense I'd suggest reading through
http://guides.rubyonrails.org/getting_started.html which explains all the basics.
Bookmarks