Guest User

Untitled

a guest
Jul 22nd, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. # GET /restaurants/new
  2. def new
  3. @extra_css = ['new_restaurant']
  4. respond_with(@restaurant = Restaurant.new)
  5. end
  6.  
  7. # POST /restaurants
  8. def create
  9. @restaurant = Restaurant.new(params[:restaurant])
  10.  
  11. respond_to do |format|
  12. if @restaurant.save
  13. format.html { redirect_to(@restaurant, :notice => _('Restaurant was successfully created.')) }
  14. else
  15. format.html { render :action => "new" }
  16. end
  17. end
  18. end
Add Comment
Please, Sign In to add comment