Skip to content

Instantly share code, notes, and snippets.

View jakelear's full-sized avatar

Jake Lear jakelear

View GitHub Profile
diff --git a/src/models/public-user.js b/src/models/public-user.js
index 276f831..7f1902b 100644
--- a/src/models/public-user.js
+++ b/src/models/public-user.js
@@ -12,6 +12,21 @@ class PublicUser extends Model {
}
}
+ updateCreditCard ({ id, input }) {
+ const route = `/payment_methods/${id}/card`;
diff --git a/src/components/bill-history/bill-history.component.jsx b/src/components/bill-history/bill-history.component.jsx
index 733aae05..37fd1fde 100644
--- a/src/components/bill-history/bill-history.component.jsx
+++ b/src/components/bill-history/bill-history.component.jsx
@@ -87,8 +87,8 @@ export default class BillHistory extends React.Component {
dy={-16}
style={style}
text={[
- (record) => convertPctChange(record.pctChange),
- (record) => convertMoney(record.value)
<TabContainer tabs={['Tab One Label', 'Tab Two Label']}>
<ChildComponent1 />
<ChildComponent2 />
</TabContainer>
diff --git a/src/components/solar/solar.component.jsx b/src/components/solar/solar.component.jsx
index f60301ea..9409325f 100644
--- a/src/components/solar/solar.component.jsx
+++ b/src/components/solar/solar.component.jsx
@@ -8,6 +8,7 @@ import './solar.scss';
export default class Solar extends React.Component {
static propTypes = {
hasPremiumWindPlan: PropTypes.bool.isRequired,
+ hasSolar: PropTypes.bool.isRequired,
accounts: PropTypes.array.isRequired,
user-booleans
hasSolar () {
- return this.data.solarAccounts.length > 0;
+ return this.data.solarAccounts.filter((a) => a.status === 'active').length > 0;
}
hasSupportedUtility () {
- return this.data.utilities.filter((u) => u.supported).length > 0;
+ const supportedUtilityIds = this.data.utilities.filter((u) => u.supported);
@jakelear
jakelear / index.slim
Created June 8, 2017 15:34
WebGL video through shader
<script id="shader-fs" type="x-shader/x-fragment">
'
varying highp vec2 vTextureCoord;
varying highp vec3 vLighting;
#ifdef GL_ES
precision highp float;
#endif
uniform highp vec2 resolution;
diff --git a/app/views/shared/campaigns/reskin/_reskin.html.erb b/app/views/shared/campaigns/reskin/_reskin.html.erb
index dd50b25..e21998e 100644
--- a/app/views/shared/campaigns/reskin/_reskin.html.erb
+++ b/app/views/shared/campaigns/reskin/_reskin.html.erb
@@ -80,8 +80,8 @@
<script type="text/javascript">
SBN.Campaigns.Components.addComponentCandidate({
type: "clientReskin",
- style: "<%= raw escape_javascript(reskin_styles.html_safe) %>",
- js: "<%= raw escape_javascript(reskin_js.html_safe) %>",
diff --git a/app_sbn/cells/sbn_rocks/ticketmaster_cell.rb b/app_sbn/cells/sbn_rocks/ticketmaster_cell.rb
index 5da4ec3..675045d 100644
--- a/app_sbn/cells/sbn_rocks/ticketmaster_cell.rb
+++ b/app_sbn/cells/sbn_rocks/ticketmaster_cell.rb
@@ -29,6 +29,11 @@ class SbnRocks::TicketmasterCell < Chorus::Cell
jewelsfromthecrown.com
}
+ forbidden = %w{
+ baltimorebeatdown.com
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
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)