. 
.
.
def create
  @post = Post.new(params[:post])
  @post.blog = @blog
  
  respond_to do |format|
    if @post.duplicate? or @blog.posts << @post
      flash[:notice] = 'Wpis zosta utworzony.'
      format.html { redirect_to blog_post_url(:id => @post) }
    .
    .
    .

