Skip to content

Instantly share code, notes, and snippets.

=label_tag :school_district, "School District"
= hidden_field_tag :school_district,
'',
:class => 'select2 ajax',
:data => { :source => reports_autocomplete_path('schooldistrict'), :column => 'schooldistrict' }
match '/reports/autocomplete/:column_name' => 'reports#autocomplete', as: :reports_autocomplete
.retailers
.col-1
=link_to 'Amazon', 'http://amazon.com'
=link_to 'Best Buy', 'http://amazon.com'
.col-2
=link_to 'Dick\'s Sporting Goods', 'http://amazon.com'
=link_to 'Fry\'s', 'http://amazon.com'
.col-3
( () ->
#Protects views where angular is not loaded from errors
if typeof angular == 'undefined'
return
module = angular.module 'NativeNavigation', []
module.factory 'NativeNavigation', () ->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>It’s time to go shopping with Worth It!</title>
<style type="text/css">
/***********
Originally based on The MailChimp Reset from Fabio Carneiro, MailChimp User Experience Design
### UTILITY METHODS ###
def create_visitor
@visitor ||= { :name => "Testy McUserton", :email => "example@example.com",
:password => "changeme", :password_confirmation => "changeme" }
end
def find_user
@user ||= User.first conditions: {:email => @visitor[:email]}
end
<script type="text/javascript">
document.addEventListener("deviceready", deviceReady);
function deviceReady() {
jQuery('.scroll-wrapper').css('min-height', $(window).height() - 55 + 'px');
}
</script>
( () ->
#Protects views where angular is not loaded from errors
if typeof angular == 'undefined'
return
'use strict'
module = angular.module('PrivateNoteModel', ['OrmModel'])
module.factory 'PrivateNotes', (Orm) ->
eventPlanningApp.controller 'ActivityParkingCtrl', ($scope, Message, Activities, NativeNavigation) ->
$scope.activity = Activities.current()
$scope.update = ()->
Activities.update $scope.activity
Message.broadcast 'updateActivity'
NativeNavigation.back()
$scope.open = (page) ->
NativeNavigation.goTo('views/eventPlanning/'+page+'.html')
sortAndGroup = (objects)->
sorted = _.sortBy objects, (object)->
object.date
.reverse()
grouped = _.groupBy sorted, (object)->
object.date
_.inject grouped, (results, val, ind)->
results.push { date: { value: ind, activities: val} }