-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ref Task #7144: Submit question #11
Conversation
ready |
app/controllers/posts_controller.rb
Outdated
@@ -8,6 +8,7 @@ def new | |||
|
|||
def create | |||
@post = current_user.posts.build post_params | |||
@post.post_type = 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dùng enum text để chỉ định đi, ko dùng số thế này, khó hiểu lắm
|
||
def create | ||
@question = current_user.posts.build question_params | ||
@question.post_type = 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
đây nữa, dùng enum text
@@ -1,5 +1,6 @@ | |||
class Ckeditor::Picture < Ckeditor::Asset | |||
mount_uploader :data, CkeditorPictureUploader, mount_on: :data_file_name | |||
self.inheritance_column = nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cần type cho cái gì vậy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cái upload ảnh của em nó bị lỗi nên em thêm để sửa đấy mà :3
galetahub/ckeditor#739
which tells Rails to ignore the type
column with respect to STI.
Để thằng rails nó bỏ qua cái cột type ạ :3
ready |
Kích hoạt khi người dùng ấn nút tạo câu hỏi
Ảnh chạy rubocop:
Link ticket redmine:
https://edu-redmine.framgia.vn/issues/7144