Module: AngularFormsApp.js Controller: efController.js Service: efService.js Directive: efDirective.js View: efTemplate.html
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
| <system.web> | |
| <customErrors mode="On"></customErrors> | |
| <customErrors mode="Off"></customErrors> | |
| // RemoteOnly will show the yellow screen of death in the local enviornment but not the user enviornment. | |
| <customErrors mode="RemoteOnly"></customErrors> | |
| </system.web> |
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
| namespace OdeToFood.Controllers | |
| { | |
| public class CuisineController : Controller | |
| { | |
| [HttpGet] | |
| public ActionResult Search(string name) | |
| { | |
| var message = Server.HtmlEncode(name); | |
| return Content(message); | |
| } |
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
| namespace OdeToFood.Controllers | |
| { | |
| public class CuisineController : Controller | |
| { | |
| // | |
| // GET: /Cuisine/ | |
| public ActionResult Search(string name) | |
| { | |
| var message = Server.HtmlEncode(name); |
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
| namespace OdeToFood.Controllers | |
| { | |
| public class HomeController : Controller | |
| { | |
| public ActionResult Index() | |
| { | |
| var controller = RouteData.Values["controller"]; | |
| var action = RouteData.Values["action"]; | |
| var id = RouteData.Values["id"]; |
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
| 1. Don't waste your co-worker's time. | |
| 2. If someone asks you if you understand something and you don't, be upfront about it. | |
| 3. Write up specs before working on a non-trivial problem. | |
| 4. Use the scientific method when working on a non-trivial problem. Construct a hypothesis, test it, and analyze the results. | |
| 5. If you can't think of any possible way to make progress on a problem then ask for help. (Note: have you really tried everything you could think of? Remember rule #1) When asking for help, consider showing your specs and a list of the things you've tried to the person you're asking. | |
| 6. Don't be afraid to ask the same question more than once if you don't understand the explanation. |
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
| cd my_project | |
| git init | |
| git add * | |
| git commit -m "My initial commit message" | |
| git remote add origin [email protected]:my_project.git | |
| git push -u origin master |
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
| Deploying an app to Heroku | |
| Add the rails_12factor gem | |
| group :production do | |
| gem 'rails_12factor' | |
| end | |
| $ bundle install --without production. | |
| This will configure Bundler not to install the 12factor gem locally. (Bundler will remember that setting for your project, so you can just run $ bundle after that time.) | |
| $ brew install heroku-toolbelt | |
| if you don't have it installed. |
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
| Convert a simple rails app to work with ember | |
| * Edit controller (remove all of the HTML responses, as well as the new and edit actions, change strong params to use fetch.) | |
| * Edit router (remove new and edit actions from model resources and set root route to "application#index") | |
| * Remove app/views/model_views folder | |
| * Remove partials in layout folder | |
| * Remove body code in layouts/application.html.erb (body should be empty) | |
| * Remove turbolinks from stylesheet_link_tag and javascript_include_tag | |
| * Rename (layouts/application.html.erb) to (application/index.html.erb) | |
| * Remove turbolinks and jquery_ujs from application.js |
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
| Setup for a simple rails app | |
| gems | |
| rails g rspec:install | |
| edit database.yml | |
| rake db:create | |
| rails g migration migration_name | |
| rake db:migrate db:test:prepare | |
| create model (with validation tests) | |
| pass validation tests (Example: wikipages/spec/models/contact_spec.rb) |