Skip to content

Instantly share code, notes, and snippets.

View travisdmathis's full-sized avatar
🏠
Working from home

Travis Mathis travisdmathis

🏠
Working from home
View GitHub Profile
<% ActsAsTaggableOn::Tagging.find_all_by_context("tags").each do |tagging| %>
<%= link_to tagging.tag, tag_path(tagging.tag), :class => "btn btn-success btn-lg" %>
<% end %>
Output:
localhost/tags/1
Desired Output:
localhost/tags/TagName
2013-11-14T22:44:42.989330+00:00 app[web.1]: F, [2013-11-14T22:44:42.983181 #2] FATAL -- :
2013-11-14T22:44:42.989330+00:00 app[web.1]: ActionController::RoutingError (No route matches [GET] "/assets/application-4804ea275189d0fb32145d6dc1d312ef.css"):
2013-11-14T22:44:42.988848+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/sendfile.rb:112:in `call'
2013-11-14T22:44:42.988848+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/engine.rb:511:in `call'
2013-11-14T22:44:42.988848+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.1/lib/rails/application.rb:97:in `call'
2013-11-14T22:44:42.988848+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call'
2013-11-14T22:44:42.987425+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call'
2013-11-14T22:44:42.986440+00:00 app[web.1]: F, [2013-11-14T22:41:58.579062 #2] FATAL -- :
2013-11-14T22:44:42.987425+00:00 app[web.1]: vendor/bundle
2013-11-14T23:28:25.897901+00:00 heroku[router]: at=info method=GET path=/assets/application.css host=limitless-dawn-3085.herokuapp.com fwd="69.54.5.98" dyno=web.1 connect=1ms service=6ms status=404 bytes=1351
2013-11-14T23:30:18.470832+00:00 app[web.1]: Started GET "/blog" for 69.54.5.98 at 2013-11-14 23:30:18 +0000
2013-11-14T23:30:18.470832+00:00 app[web.1]: Started GET "/blog" for 69.54.5.98 at 2013-11-14 23:30:18 +0000
2013-11-14T23:30:18.472108+00:00 app[web.1]: Processing by PostsController#index as HTML
2013-11-14T23:30:18.472146+00:00 app[web.1]: Processing by PostsController#index as HTML
2013-11-14T23:30:18.511935+00:00 app[web.1]: Completed 404 Not Found in 40ms
2013-11-14T23:30:18.514208+00:00 app[web.1]:
2013-11-14T23:30:18.511935+00:00 app[web.1]: Completed 404 Not Found in 40ms
2013-11-14T23:30:18.514208+00:00 app[web.1]:
2013-11-14T23:30:18.514208+00:00 app[web.1]: ActiveRecord::RecordNotFound (ActiveRecord::RecordNotFound):
<% if flash[:notice] %>
<div class="alert alert-block">
<button type="button" class="close" data-dismiss=":notice">&times;</button>
<%= flash[:notice] %></p>
</div>
<% end %>
.spin {
position: relative;
height: 70px;
width: 70px;
border-radius: 50%;
border:dashed 5px white;
background-image:url(small_logo_icon.png);
-webkit-animation-name: spin;
-webkit-animation-duration: 1.5s;
-webkit-animation-iteration-count: infinite;
body {
background: url(bg.jpg) no-repeat center center fixed;
-webkibt-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
var array = process.argv;
var arrayLength = array.length;
for (var i = 2; i < arrayLength; i++) {
var a = process.argv[i];
var total = 0;
$.each(a,function() {
total += this;
});
}
.navbar-collapse, .collapse {
overflow-x:hidden;
}
.navbar-collapse.in {
overflow-y:auto;
}
<!-- sign up form -->
<div id="signup">
<div class="background">
<div class="container">
<div class="row">
<div class="col-md-4">
<div class="row">
<h2 class="secondary text-center"> GET YOUR <u><font class="white">FREE</font></u> WALLET</h2>
</div>
</div>
post_type=gallery&gallery_categories=weddings&orderby=menu_order&order=ASC
what im doing is made a var called $catg which carries the slug, I want to use the slug as a category name, so I pass that var into the $arg string for 'gallery_categories='.$catg
3:36 which works great for echo,,not great when actually used in wp_query($args);