added Project model with project_name and Task model with title&status

This commit is contained in:
KaungKaung
2026-01-26 14:00:27 +06:30
parent 2f329bc8cf
commit de19e675c8
8 changed files with 53 additions and 0 deletions

2
app/models/project.rb Normal file
View File

@@ -0,0 +1,2 @@
class Project < ApplicationRecord
end

2
app/models/task.rb Normal file
View File

@@ -0,0 +1,2 @@
class Task < ApplicationRecord
end

View File

@@ -0,0 +1,9 @@
class CreateProjects < ActiveRecord::Migration[8.1]
def change
create_table :projects do |t|
t.string :project_name
t.timestamps
end
end
end

View File

@@ -0,0 +1,10 @@
class CreateTasks < ActiveRecord::Migration[8.1]
def change
create_table :tasks do |t|
t.string :title
t.string :status
t.timestamps
end
end
end

7
test/fixtures/projects.yml vendored Normal file
View File

@@ -0,0 +1,7 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
project_name: MyString
two:
project_name: MyString

9
test/fixtures/tasks.yml vendored Normal file
View File

@@ -0,0 +1,9 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
title: MyString
status: MyString
two:
title: MyString
status: MyString

View File

@@ -0,0 +1,7 @@
require "test_helper"
class ProjectTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end

7
test/models/task_test.rb Normal file
View File

@@ -0,0 +1,7 @@
require "test_helper"
class TaskTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end