File: articles_controller.rb

package info (click to toggle)
ruby-paper-trail 12.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,200 kB
  • sloc: ruby: 6,743; makefile: 6
file content (18 lines) | stat: -rw-r--r-- 276 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

class ArticlesController < ApplicationController
  def create
    @article = Article.create article_params
    head :ok
  end

  def current_user
    "foobar"
  end

  private

  def article_params
    params.require(:article).permit!
  end
end