On Simple Calendar I would like to post an article → post calendar screen (create) → reflect it in the calendar. Currently, article posting is done, and I want to extract the title data of the article posting from it and display and acquire only the title data on the calendar posting screen.
I have tried it
1、
I got an error like this.
As an association between blog (calendar) and tweet (article)
Is assembled like this.
The db (database) of the blog is here.
create_table :blogs do |t|
t.string :title
t.text :content
t.datetime :start_time
t.references :user, foreign_key: true
t.references :tweet, foreign_key: true
t.string :tweet_title
t.timestamps
end
The blog_controller is here.
When posting an article, the view could be displayed on another page.
I would appreciate it if you could answer. I am an inexperienced person, but thank you.
Recommended Posts