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 () { | |
| 'use strict'; | |
| }()); |
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 POST "/users" for ::1 at 2015-02-15 16:08:06 -0800 | |
| Processing by Devise::RegistrationsController#create as HTML | |
| Parameters: {"utf8"=>"✓", "authenticity_token"=>"kovkapHotITJmc67AYqrGFrcC4adcA3uCeL9Y+0hbB0RckGhR883KQNmsb9F8gSkkXSiXJ875A5zx8YxNxP/zA==", "user"=>{"name"=>"Andre Kibbe", "address"=>"1244 Euclid St. # 6", "city"=>"Santa Monica", "postal_code"=>"90404", "email"=>"akibbe02@gmail.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "commit"=>"Sign up"} | |
| Unpermitted parameters: name, address, city, postal_code | |
| (0.1ms) begin transaction | |
| User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = 'akibbe02@gmail.com' LIMIT 1 | |
| (0.1ms) rollback transaction | |
| Rendered devise/shared/_links.html.erb (2.5ms) | |
| Rendered devise/registrations/new.html.erb within layouts/application (16.0ms) | |
| Category Load (0.2ms) SELECT "categories".* FROM "categories" |
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
| <h2>Sign up</h2> | |
| <%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %> | |
| <%= devise_error_messages! %> | |
| <div><%= f.label :email %><br /> | |
| <%= f.email_field :email, autofocus: true %></div> | |
| <div><%= f.label :password %><br /> | |
| <%= f.password_field :password, autocomplete: "off" %></div> |
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
| rails g devise:views | |
| invoke Devise::Generators::SharedViewsGenerator | |
| exist app/views/devise/shared | |
| identical app/views/devise/shared/_links.html.erb | |
| invoke form_for | |
| exist app/views/devise/confirmations | |
| identical app/views/devise/confirmations/new.html.erb | |
| exist app/views/devise/passwords | |
| identical app/views/devise/passwords/edit.html.erb | |
| identical app/views/devise/passwords/new.html.erb |
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
| # The stack I wrote for http://vimeo.com/26391171 | |
| # Note that there is an intentional bug in the each method :) | |
| class Stack | |
| Node = Struct.new :data, :next | |
| def push(data) | |
| @head = Node.new data, @head | |
| 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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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
| # For Alex Yang's Udemy course: The Startup's Guide to Ruby on Rails | |
| # https://www.udemy.com/the-startups-guide-to-web-development-with-ruby-on-rails | |
| <h1>Editing listing</h1> | |
| <%= render 'form' %> | |
| <%= link_to 'Show', @listing, class: "btn btn-link" %> | | |
| # Change from listing_path shown in Lecture 30 and previous lectures | |
| <%= link_to 'Back', seller_path, class: "btn btn-link"%> |
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
| # For Alex Yang's Udemy course: The Startup's Guide to Ruby on Rails | |
| # https://www.udemy.com/the-startups-guide-to-web-development-with-ruby-on-rails | |
| class Listing < ActiveRecord::Base | |
| if Rails.env.production? | |
| has_attached_file :image, | |
| :styles => { :medium => "200x", :thumb => "100x100>" }, :default_url => "default.jpg", | |
| :storage => :dropbox, | |
| :dropbox_credentials => Rails.root.join("config/dropbox.yml"), | |
| :path => ":style/:id_:filename" |