class Content < ApplicationRecord acts_as_taggable #追加(acts-as-taggable-onの別名) ~ end class ContentsController < ApplicationController before_action :set_group def new @content = Content.new end def create @content = @group.contents.new(content_params) @content.user_id = current_user.id if @content.save redirect_to group_contents_path(@group), notice: '保存できました' else @content.images.new @contents =