Sha256: 9aaaf98d95b9d0e5732b6e1b1e6448e82a6945ca6aa7ac27534eb8691d620e88

Contents?: true

Size: 564 Bytes

Versions: 1

Compression:

Stored size: 564 Bytes

Contents

class SongsController < ApplicationController
  def new
    run Song::New
  end

  def show
    run Song::Show
  end

  def create
    run Song::Create do |result|
      return redirect_to song_path(result["model"].id)
    end

    render :new
  end

  def new_with_result
    result = run Song::New

    @class = result["model"].class
  end

  def edit
    run Song::Update::Present
  end

  def update
    run Song::Update do |result|
      return redirect_to song_path(result[:model].id)
    end

    render :update
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
trailblazer-future-2.1.0.rc1 test/rails5.0/app/controllers/songs_controller.rb