This file contains 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
$ heroku accounts:add work --auto |
This file contains 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
SimpliFit App Requirements and Business Rules | |
Rules: | |
Each person will have a User account | |
Each User enters in 1 point per workout, with a workout category and duration | |
Each Point is calculated and totaled per quarter |
This file contains 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
require 'spec_helper' | |
require 'pry' | |
feature "User interacts with the queue" do | |
scenario "user adds and reorders videos in the queue" do | |
dramas = Fabricate(:category) | |
dances_with = Fabricate(:video, title: "Dances With Wolves", category: dramas) | |
donnie = Fabricate(:video, title: "Donnie Darko", category: dramas) | |
village = Fabricate(:video, title: "The Village", category: dramas) | |
sign_in | |
find("a[href='/videos/#{dances_with.id}']").click |
This file contains 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
''' | |
# bash/zsh completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# The contained completion routines provide support for completing: | |
# | |
# *) local and remote branch names |
This file contains 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
#routes | |
PostitTemplate::Application.routes.draw do | |
root to: 'posts#index' | |
get 'register', to: 'users#new' | |
get '/login', to: 'sessions#new' | |
post '/login', to: 'sessions#create' | |
get '/logout', to: 'sessions#destroy' |
This file contains 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
partials = Part.find_all_by_part_type "PartPartial" | |
selected_parts = partials.select {|part| part.part.partial == "responsive_client_portal"} | |
pages = [] | |
page_links = [] | |
selected_parts.each do |part| | |
pages << part.page | |
end | |
pages.each do |page| |
This file contains 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
#content_helper, starting at line no. 428 | |
#was | |
if template_exists?(part.part.partial, "content", true) | |
#solution | |
if lookup_context.template_exists?(part.part.partial, ["content"], true) | |
#spec edit | |
#content_helper_spec.rb starting on line no. 2303 | |
#was | |
before do |
This file contains 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
#Deprecated in Rails 3.1 | |
<% form_tag %> #note the different erb tags below | |
<% form_for %> #this is only in regards to the form tag helpers | |
request.request_uri | |
#New syntax for 3.1 upgrade | |
<%= form_tag %> #3.1 requires the erb tags with the '=', or the evaluate and render tags for form helpers. | |
<%= form_for %> | |
request.url #this is backwards compatible, request.request_uri will not work in 3.1 |
This file contains 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() { | |
var e, setMap; | |
try { | |
window.getMapCoords = function() { | |
return $.getJSON("//maps.googleapis.com/maps/api/geocode/json", { | |
address: widgetMapConfig.address, | |
sensor: "false" | |
}).done(function(data) { | |
var coordinates; |
This file contains 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
<%= link_to("BodyOfLink", @store.page_url("name_of_page")) |
NewerOlder