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
| "{"presentation":{"title":""}}" |
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
| % ember serve | |
| version: 0.1.0 | |
| Livereload server on port 35729 | |
| Serving on http://0.0.0.0:4200 | |
| EEXIST, file already exists '/Users/davetheninja/Projects/bootcamp/bootcamp-client/tmp/coffee_script_filter-tmp_dest_dir-eHwB8mv6.tmp/bootcamp-client/router.js' | |
| Error: EEXIST, file already exists '/Users/davetheninja/Projects/bootcamp/bootcamp-client/tmp/coffee_script_filter-tmp_dest_dir-eHwB8mv6.tmp/bootcamp-client/router.js' | |
| at Object.fs.openSync (fs.js:438:18) | |
| at Object.fs.writeFileSync (fs.js:977:15) | |
| at Object.copyPreserveSync (/Users/davetheninja/Projects/bootcamp/bootcamp-client/node_modules/ember-cli-coffeescript/node_modules/broccoli-coffee/node_modules/broccoli-filter/node_modules/broccoli-kitchen-sink-helpers/index.js:150:8) | |
| at /Users/davetheninja/Projects/bootcamp/bootcamp-client/node_modules/ember-cli-coffeescript/node_modules/broccoli-coffee/node_modules/broccoli-filter/index.js:42:19 |
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
| function a() { // index 1, or first function in file | |
| } | |
| function b() { // index 2, or second function in file | |
| } | |
| function c() { // index 3, or third function in file |
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 Api::ScheduledCoursesController < Api::BaseController | |
| def create | |
| @scheduled_course = ScheduledCourse.create!({ | |
| course: get_course, | |
| location: build_location | |
| }) | |
| render :create, status: :created | |
| 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
| def get_course | |
| course_params = params[:course] | |
| Course.find_by_id(course_params[:id]) unless course_params.nil? | |
| 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
| def get_course | |
| course_id = nil | |
| course_id = params[:course][:id] if not params[:course].nil? and params[:course].has_key(:id) | |
| Course.find_by_id(course_id) | |
| 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
| ActiveSupport::Inflector.inflections do |inflect| | |
| inflect.singular 'address', 'address' | |
| inflect.plural 'address', 'addresses' | |
| inflect.singular 'addresses', 'address' | |
| inflect.plural 'addresses', 'addresses' | |
| 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
| window.MyView = Backbone.View.extend({ | |
| ... | |
| render: function() { | |
| var html = My.Namespace.Templates.apply("template_name", new MyDisplayModel({ | |
| model: this.model, | |
| assHatOfTheWeek: "asshatting on alcohol at confs" | |
| })); |
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
| tamplates.js.coffee | |
| ---------------------- | |
| class window.Templates | |
| @templates = {} | |
| @add: (name, template) -> | |
| @templates[name] = template | |
| @apply:(name, context) -> |
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
| # updated solution | |
| #in the view | |
| = render :partial => "element", :collection => @elements | |
| #in the partial | |
| - if element_counter % 2 == 1 | |
| .break | |
NewerOlder