Skip to content

Instantly share code, notes, and snippets.

View TeriPastorino's full-sized avatar

Teri Pastorino TeriPastorino

  • East Bay Area, CA
View GitHub Profile
@TeriPastorino
TeriPastorino / _item.html.erb
Created March 31, 2015 21:13
conditional formatting
<%= content_tag :li, class: 'list-group-item todo-item', id: "item-#{item.id}" do %>
- <%= item.description %>
- <%= link_to " ", [current_user, item], method: :delete, class: 'glyphicon glyphicon-ok pull-right', remote: true %>
- <div class="text-center-small">
- <small class="<%= format_days_remaining(item.days_left) %>">
- <%= item.days_left.to_s. + " days left to complete" %>
- </small>
- </div>
-<% end %>
@TeriPastorino
TeriPastorino / ajax glyph diff
Created March 24, 2015 16:44
git diff ajax/glyphs
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js
index ad3eb2c..c5f2b04 100644
--- a/app/assets/javascripts/application.js
+++ b/app/assets/javascripts/application.js
@@ -13,6 +13,6 @@
//= require jquery
//= require jquery_ujs
//= require turbolinks
-//= require bootstrap
//= require bootstrap-sprockets
# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
#
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
#
# @kyletcarlson
#
# This skeleton also assumes you're using the following gems:
#Model
@user.should have(1).error_on(:username) # Checks whether there is an error in username
@user.errors[:username].should include("can't be blank") # check for the error message
#Rendering
response.should render_template(:index)
#Redirecting
response.should redirect_to(movies_path)