Sha256: f883f1ba61a0e7769ac4f15c5ccf8c47534a1cfb3fe0f2c3bd5dd0cc36cd7505
Contents?: true
Size: 387 Bytes
Versions: 36
Compression:
Stored size: 387 Bytes
Contents
class AlbumsController < ActionController::Base def new album = Album.new(:songs => [Song.new, Song.new]) @form = AlbumForm.new(album) end def create album = Album.new(songs: [Song.new, Song.new]) @form = AlbumForm.new(album) if @form.validate(params["album"]) @form.save redirect_to album_path(album) else render :new end end end
Version data entries
36 entries across 36 versions & 1 rubygems