Witam
Piszę aplikację w railsach - wywołałem takie polecenia:

ar_1> rails new rails_ar -d postgresql
ar_1> rails g scaffold Lecture name:string short_name:string etcs_point:integer

plik ar_1/db/seed.rb

# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
#
# Examples:
#
#   movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
#   Character.create(name: 'Luke', movie: movies.first)
Lecture.create!(name: 'Ruby on Rails',
short_name: 'ROR',
etcs_point: 6)

Lecture.create!(name: 'Ruby',
short_name: 'Rb',
etcs_point: 6)

Lecture.create!(name: 'Programowanie 1',
short_name: 'P1',
etcs_point: 10)

Lecture.create!(name: 'Programowanie 2',
short_name: 'P2',
etcs_point: 10)

Lecture.create!(name: 'Algebra liniowa 1',
short_name: 'A1',
etcs_point: 5)

Lecture.create!(name: 'Algebra liniowa 2',
short_name: 'A2',
etcs_point: 5)

Lecture.create!(name: 'Rachunek prawdopodobieństwa',
short_name: 'RP',
etcs_point: 5)

Lecture.create!(name: 'Algorytmy i Struktury Danych 1',
short_name: 'ASD 1',
etcs_point: 10)

Lecture.create!(name: 'Algorytmy i Struktury Danych 2',
short_name: 'ASD 2',
etcs_point: 10)

Lecture.create!(name: 'Metody numeryczne',
short_name: 'MN',
etcs_point: 10)

Po wpisaniu ar_1> rake db:migrate

http://ifotos.pl/z/qhxawnr/

Uczę się rails z tego (próbuję ogarnąć z tego na początek to całe MVC)

http://ruby-on-rails-tutorial.x25.pl/chapter/show.ActiveRecord
http://ruby-on-rails-tutorial.x25.pl/chapter/show.ActiveRecord