Skip to content

Instantly share code, notes, and snippets.

View jakelear's full-sized avatar

Jake Lear jakelear

View GitHub Profile
function countCSSRules() {
var results = '',
log = '';
if (!document.styleSheets) {
return;
}
for (var i = 0; i < document.styleSheets.length; i++) {
countSheet(document.styleSheets[i]);
}
function countSheet(sheet) {
@jakelear
jakelear / Ohgodthenesting.scss
Created August 6, 2013 15:26
Example of nasty deep nesting from original Polygon styles.
#nav_social {
float: right;
margin-right: 50px;
& > ul {
position: relative;
border: none;
& > li {
display: inline-block;
@jakelear
jakelear / Specificselectors
Created August 6, 2013 15:34
Example of new Vox style SCSS selectors.
$m : '.m-site-nav';
#{$m} {
@extend .clearfix;
@extend .-font-gotham;
position: relative;
text-transform: uppercase;
width: 100%;
z-index: 35;
height: $sticky_nav_height;
_.debounce = function(func, wait, immediate) {
var timeout;
return function() {
var context = this, args = arguments;
var later = function() {
timeout = null;
if (!immediate) func.apply(context, args);
};
var callNow = immediate && !timeout;
clearTimeout(timeout);
71cd321221901b0ea139ef99af83ef58]
NoMethodError - undefined method `route_prefix' for NilClass:Class:
app/models/card.rb:46:in `prepare_slug'
app/mixins/models/entry/sluggify.rb:57:in `set_slug'
activesupport (3.2.18) lib/active_support/callbacks.rb:559:in `_run__2669032732502098918__save__2496517489680465968__callbacks'
activesupport (3.2.18) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.18) lib/active_support/callbacks.rb:385:in `_run_save_callbacks'
activesupport (3.2.18) lib/active_support/callbacks.rb:81:in `run_callbacks'
activerecord (3.2.18) lib/active_record/callbacks.rb:264:in `create_or_update'
activerecord (3.2.18) lib/active_record/persistence.rb:84:in `save'
diff --git a/app/views/shared/chorus/social/_social_buttons.html.erb b/app/views/shared/chorus/social/_social_buttons.html.erb
index 8d4df52..033e05d 100644
--- a/app/views/shared/chorus/social/_social_buttons.html.erb
+++ b/app/views/shared/chorus/social/_social_buttons.html.erb
@@ -25,15 +25,18 @@
<% elsif ['twitter-tweet', 'twitter-tall'].include?(type) %>
<%
twitter_link_html_options = { :class => 'twitter-share-button' }
- twitter_link_html_options[:'data-text'] = (current_network.config.uses_promo_headlines_for_social? ? (@entry.promo_headline_plain || @entry.title_plain) : @entry.title_plain) if @entry
+ if @entry
diff --git a/lib/entry_group_auto_populator.rb b/lib/entry_group_auto_populator.rb
index 2d5e5ca..4f5bf54 100644
--- a/lib/entry_group_auto_populator.rb
+++ b/lib/entry_group_auto_populator.rb
@@ -24,7 +24,7 @@ class EntryGroupAutoPopulator
end
# bugzid 161370
- if entry.community.is_a?(Blog) && entry.community.regional_hub
+ if !entry.is_a?(FanPost) && entry.community.is_a?(Blog) && entry.community.regional_hub
diff --git a/app/controllers/rss_controller.rb b/app/controllers/rss_controller.rb
index c27e263..f556ca4 100644
--- a/app/controllers/rss_controller.rb
+++ b/app/controllers/rss_controller.rb
@@ -580,6 +580,7 @@ class RssController < BaseCommunityController
def load_feed_filter(filter)
@feed_title = get_feed_title(filter.title)
+ @feed_updated_at = filter.updated_at
@root_url = url_for(current_community)
diff --git a/app/controllers/rss_controller.rb b/app/controllers/rss_controller.rb
index c27e263..88fefb5 100644
--- a/app/controllers/rss_controller.rb
+++ b/app/controllers/rss_controller.rb
@@ -580,6 +580,7 @@ class RssController < BaseCommunityController
def load_feed_filter(filter)
@feed_title = get_feed_title(filter.title)
+ @feed_updated_at = filter.updated_at.to_time.to_i
@root_url = url_for(current_community)
diff --git a/app/controllers/rss_controller.rb b/app/controllers/rss_controller.rb
index c27e263..cc4739e 100644
--- a/app/controllers/rss_controller.rb
+++ b/app/controllers/rss_controller.rb
@@ -580,6 +580,8 @@ class RssController < BaseCommunityController
def load_feed_filter(filter)
@feed_title = get_feed_title(filter.title)
+ @feed_id = filter.id
+ @feed_updated_at = filter.updated_at.to_time.to_i