Skip to content

Instantly share code, notes, and snippets.

class ArticlesController < ApplicationController
def new
writer = Writer.find(params[:writer_id])
@article = writer.articles.build
end
def save
writer = Writer.find(params[:writer_id])
@article = writer.articles.build(article_params)
@article.save