render :new end def create authorize! :create, Song @song = Song.new(params[:song]) if @song.save current_user.increment_song_counter redirect_to @song else render :new end end Rails Rails With TRB
Error"} ] class Song < ActiveRecord::Base belongs_to :album end class Album < ActiveRecord::Base has_many :songs end class AlbumForm < Reform::Form collection :songs, populate_if_empty: Song do property :name end end