This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| VIEW: | |
| <% @foods.each do |panel| %> | |
| <%= form_for panel do |f| %> | |
| <div class='menu_edit'> | |
| <div class="field"> | |
| <h2><%= f.text_field :title %></h2> | |
| </div> | |
| <div class="field"> | |
| <h3><%= f.text_field :item01 %></h3> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class FoodPanelsController < ApplicationController | |
| before_filter :authorize, only: [:update] | |
| def update | |
| panel = FoodPanel.find(params[:id]) | |
| if panel.update(food_params) | |
| redirect_to root_url | |
| flash[:notice] = "Menu has been updated." | |
| else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @photos = [] | |
| posts['data'].each do |photo| | |
| caption = "" | |
| caption = photo['caption']['text'] unless photo['caption'] == nil | |
| url = photo['images']['standard_resolution']['url'] | |
| @photos.append(url, caption) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Started GET "/news" for 127.0.0.1 at 2014-10-15 12:31:14 -0500 | |
| Processing by HomeController#news as HTML | |
| Rendered home/news.html.erb within layouts/application (1.5ms) | |
| Completed 500 Internal Server Error in 278ms | |
| ActionView::Template::Error (undefined method `[]' for nil:NilClass): | |
| 5: <% @photos.each do |photo| %> | |
| 6: <div class="instagram_image"> | |
| 7: <div> | |
| 8: <span><%= photo['caption']['text'] %></span> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class HomeController < ApplicationController | |
| end | |
| def index | |
| end | |
| def menu | |
| @drinks = DrinkPanel.all | |
| @foods = FoodPanel.all | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Started GET "/assets/home.css?body=1" for 127.0.0.1 at 2014-10-12 18:12:58 -0500 | |
| [1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m | |
| Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at 2014-10-12 18:12:58 -0500 | |
| Started GET "/assets/foundation/foundation.abide.js?body=1" for 127.0.0.1 at 2014-10-12 18:12:58 -0500 |