tagtweet
Herokuによるデプロイ https://tagtweet-20201231.herokuapp.com/
ツイートに対するタグ付機能の他、インクリメンタルサーチと呼ばれるデータベースを参照して入力している文字列と一致するタグの候補をリアルタイムに画面上へ表示することができます。
Column | Type | Options |
---|---|---|
message | string | null: false |
- has_many :tweet_tag_relations
- has_many :tags, through: :tweet_tag_relations
Column | Type | Options |
---|---|---|
name | string | null: false, uniqueness: true |
- has_many :tweet_tag_relations
- has_many :tweets, through: :tweet_tag_relations
Column | Type | Options |
---|---|---|
tweet_id | references | foreign_key: true |
tag_id | references | foreign_key: true |
- belongs_to :tweet
- belongs_to :tag
- ruby 2.6.5
- Rails 6.0.3.4
- MySQL
% git clone https://github.com/erika618/tagtweet.git
% cd tagtweet
% bundle install
% yarn install
% rails db:create
% rails db:migrate
<!-- brakeman(脆弱性に繋がるコードがないか確認するため ※全てのファイル・全ての警告オプション) -->
% bundle exec brakeman -A -w1
<!-- rails_best_practices(読みやすいコードか確認するため) -->
% rails_best_practices .
<!-- rubocop(インデントを整えるため) -->
% bundle exec rubocop -a