This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def gender | |
| if definable.gender | |
| g = definable.gender[0,1].downcase | |
| "(#{h.content_tag :i, g })" | |
| else | |
| '' | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $cache = $this->sm->get('cache'); | |
| $cache->replaceItem('mfgs', array('TYS','TEST','Test2')); | |
| var_dump($cache->getItem('mfgs')); | |
| ?> | |
| Gives me string(5) "Array" | |
| I'm using this: http://framework.zend.com/apidoc/2.2/classes/Zend.Cache.Storage.Adapter.Redis.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class AnnotationsController < ApplicationController | |
| def index | |
| annotations = Annotation.all | |
| render json: annotations | |
| end | |
| def show | |
| annotation = Annotation.find(params[:id]) | |
| render json: annotation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class AnnotationsController < ApplicationController | |
| def index | |
| annotations = Annotation.all | |
| render json: annotations | |
| end | |
| def show | |
| annotation = Annotation.find(params[:id]) | |
| render json: annotation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Annotation | |
| include MongoMapper::Document | |
| key :quote, String | |
| key :text, String | |
| key :ranges, Array | |
| timestamps! | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Application.Collection = Backbone.Collection.extend( | |
| { | |
| constructor : function () { | |
| this.request = new Application.Request(); | |
| Backbone.Collection.apply(this, arguments); | |
| }, | |
| responseModel : Application.Response, | |
| responseEvents : {}, | |
| requestRoot : '_', | |
| checkDub : false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var href = $(this).attr('href'); | |
| $('.navbar-inner ul').filter(':visible').animate({ width:'0px' }, 1000, function(){ | |
| $(this).hide(); | |
| $('#' + href).show(function(){ | |
| $(this).animate({ width: '100%' }, 1000); | |
| }); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT * | |
| FROM `customers_master` c | |
| INNER JOIN cust_list_misty cm ON cm.name1 = c.FULL_NAME |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function(Notification) { | |
| var app = k12.app; | |
| Notification.Model = Backbone.Model.extend({ }); | |
| Notification.NotificationCollection = Backbone.Collection.extend({ | |
| parse: function(response) { | |
| return response; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function(Notification) { | |
| var app = k12.app; | |
| Notification.Model = Backbone.Model.extend({ }); | |
| Notification.Collection = Backbone.Collection.extend({ | |
| model: Notification.Model, | |
| url: '/api/notifications', | |
| parse: function(response) { |
NewerOlder