Namespace
Methods
- C
- D
- E
- I
- N
- R
- S
- U
Included Modules
- PostsController::AroundExceptions
- BlogEngine
- RailsApplication
Instance Public methods
create()
Link
POST /posts POST /posts.json
# File railties/guides/code/getting_started/app/controllers/posts_controller.rb, line 43 def create @post = Post.new(params[:post]) respond_to do |format| if @post.save format.html { redirect_to @post, notice: 'Post was successfully created.' } format.json { render json: @post, status: :created, location: @post } else format.html { render action: "new" } format.json { render json: @post.errors, status: :unprocessable_entity } end end end
destroy()
Link
DELETE /posts/1 DELETE /posts/1.json
edit()
Link
GET /posts/1/edit
index()
Link
GET /posts GET /posts.json
new()
Link
GET /posts/new GET /posts/new.json
rescue_action(e)
Link
show()
Link
show_detailed_exceptions?()
Link
update()
Link
PUT /posts/1 PUT /posts/1.json
# File railties/guides/code/getting_started/app/controllers/posts_controller.rb, line 59 def update @post = Post.find(params[:id]) respond_to do |format| if @post.update_attributes(params[:post]) format.html { redirect_to @post, notice: 'Post was successfully updated.' } format.json { head :no_content } else format.html { render action: "edit" } format.json { render json: @post.errors, status: :unprocessable_entity } end end end