Flowdock
method

create

Importance_1
Ruby on Rails latest stable (v6.1.7.7) - 1 note - Class: PostsController

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v3.2.13) is shown here.

These similar methods exist in v6.1.7.7:

create() public

POST /posts POST /posts.json

Show source
Register or log in to add new notes.
May 5, 2014 - (v3.2.13)
0 thanks

another way

Perhaps a more efficient way:

def create
  @post = Post.new(post_params)
  if @post.save
    redirect_to @post, notice: "The post #{@post.title} was added to the system."
  else
    render action: 'new'
  end
end

where post_params is:

private

def post_params
  params.require(:post).permit(..attributes to permit..)
end