I hereby claim:
- I am markjnkim on github.
- I am mark_ybu (https://keybase.io/mark_ybu) on keybase.
- I have a public key ASCK-Ov7z6rJiXTH860hJlmjWJ-LuBD5fLgixWvtbxW2igo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| { | |
| "extends": ["eslint:recommended", "plugin:react/recommended"], | |
| "plugins": ["html"], | |
| "parser": "babel-eslint", | |
| "parserOptions": { | |
| "ecmaVersion": 6, | |
| "sourceType": "module", | |
| "ecmaFeatures": { | |
| "jsx": true | |
| } |
| Name of the project: blog | |
| Team members: Mark @trumpocalypse | |
| Project Description: Create a simple blog using Rails | |
| How to install the code locally: open website on Heroku | |
| How to use the app: Enter a title and post |
| ################################################################ | |
| ##################### OOJS Stamps ################## | |
| ################################################################ | |
| var StampCollection = function(stamps){ | |
| this.stamps = stamps | |
| } | |
| StampCollection.prototype.stampNamed = function (stampName) { | |
| return this.stamps.find(function(stamp){ |
| ############# Need to make these methods destructive! ####################################### | |
| ####################### Accessor methods ######################################################## | |
| ################################################################################################## | |
| These methods do not modify the array and return some representation of the array. | |
| Array.prototype.concat() | |
| ## Returns a new array comprised of this array joined with other array(s) and/or value(s). | |
| Array.prototype.includes() | |
| ## Determines whether an array contains a certain element, returning true or false as appropriate. | |
| Array.prototype.indexOf() |
| ############################################################################ | |
| ####################### SERVER SIDE CONTROLLER ####################### | |
| ############################## Routes ################################# | |
| ############################################################################ | |
| post '/potlucks/:id/attendances' do | |
| @attendance = Attendance.new(attendee_id: current_user.id, potluck_id: params[:id],dish: params[:dish]) | |
| if @attendance.save | |
| redirect "/potlucks/#{params[:id]}" | |
| else | |
| @error_messages = @attendance.errors.full_messages |
| .btn-logout { | |
| width: 100%; | |
| padding-right: 0; | |
| padding-left: 0; | |
| text-align: left !important; | |
| color: rgba(255,255,255,.5); | |
| } | |
| .btn-logout:hover { | |
| color: rgba(255,255,255,.75); |
| ################### Ajax Checkpoint ############################### | |
| ################### Alyssa Coyotes 2017 Live Code ##################### | |
| ######################################################################## | |
| ################### applications.js ############################### | |
| $(document).ready(function() { | |
| /**** | |
| - What thing in html to bind and listen for | |
| - console.log() to make sure events are bound properly | |
| ######################### Constructor ############################### | |
| ###################### Adds behavior with methods ################## | |
| ## Acts like a class since initialized objects now inherit behavior ## | |
| User = function(options){ | |
| if (!options) options = {} | |
| this.fname = options.fname | |
| this.lname = options.lname | |
| }; |
| ################# Mark Siemer's Teacher Code for Crud Checkpoint ############# | |
| ##################### CONTROLLER #################################################### | |
| #################### SESSIONS ##################################################### | |
| # sessions new | |
| get '/login' do | |
| @user = User.new | |
| erb :'sessions/login' | |
| end |