Sha256: bc2e84d51026601088cf74daba3ce93e05da5ee491c3a707be7689523d8cd060

Contents?: true

Size: 280 Bytes

Versions: 6

Compression:

Stored size: 280 Bytes

Contents

class DirectPostsController < ApplicationController
  def new
    @post = Post.new
  end

  def create
    @post = Post.new(params.require(:post).permit(:title, :document, :image))

    if @post.save
      redirect_to [:normal, @post]
    else
      render :new
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
refile-0.5.5 spec/refile/test_app/app/controllers/direct_posts_controller.rb
refile-0.5.4 spec/refile/test_app/app/controllers/direct_posts_controller.rb
refile-0.5.3 spec/refile/test_app/app/controllers/direct_posts_controller.rb
refile-0.5.2 spec/refile/test_app/app/controllers/direct_posts_controller.rb
refile-0.5.1 spec/refile/test_app/app/controllers/direct_posts_controller.rb
refile-0.5.0 spec/refile/test_app/app/controllers/direct_posts_controller.rb