Skip to content

Instantly share code, notes, and snippets.

@notyoyoma
notyoyoma / SassMeister-input.scss
Created August 22, 2015 19:24
Generated by SassMeister.com.
// ----
// Sass (v3.4.14)
// Compass (v1.0.3)
// ----
$spaces: "m" "margin", "p" "padding";
$directions: "t" "top", "r" "right", "b" "bottom", "l" "left";
$charges: "" "-";
$defPX: 10;
<% if params[:back_to_school] %>
<h4 class="side-nav__title">Back to School:</h4>
<ul class="side-nav">
<% @celebrities.each do |c| %>
<li class="row" style="padding-bottom:.5em">
<span class="large-4 column"><%= link_to image_tag(c.avatar.small.url), user_profile_path(c.profile_url) %></span>
<span class="large-8 column"><%= link_to c.screenname, project_back_to_school_celebrity_path(c.profile_url), :class => "subheader" %></span>
</li>
<% end %>
diff --git a/app/assets/stylesheets/products-singular.css.scss b/app/assets/stylesheets/products-singular.css.scss
new file mode 100644
index 0000000..e69de29
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index e3fd632..445478e 100755
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -127,4 +127,15 @@ module ApplicationHelper
end
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index e3fd632..445478e 100755
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -127,4 +127,15 @@ module ApplicationHelper
end
+ def controller_assets asset_folder
+ if ! Dir.glob("app/assets/#{asset_folder}/#{params[:controller]}-singular.*").empty?
@notyoyoma
notyoyoma / 0_reuse_code.js
Last active August 29, 2015 14:11
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<?php
/**
* Plugin Name: Notyoyoma Ajax Comment
* Description: Enable AJAX comments
* Version: 1.0.0
* Author: Marty Naselli
* Author URI: http://3foldx.com
* Text Domain: nyymajaxcomment
* License: WTFPL
*/