Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MicropostsController < ApplicationController
- before_filter :authenticate
- def create
- @micropost = current_user.microposts.build(params[:micropost])
- if @micropost.save
- redirect_to root_path, :flash => { :success => "Micropost created!" }
- else
- @feed_items = []
- render 'pages/home'
- end
- end
- def destroy
- end
- end
Add Comment
Please, Sign In to add comment