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
module Refinery | |
module Locations | |
class Event < Refinery::Core::BaseModel | |
validates :title, :presence => true, :uniqueness => true | |
belongs_to :poster, :class_name => '::Refinery::Image' | |
belongs_to :event_category |
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
require 'rails_helper' | |
RSpec.describe PostsController, :type => :controller do | |
let(:fb_posts) { JSON.parse(File.read(Rails.root + "spec/support/fixtures/posts.json")) } | |
let(:fb_post) { fb_posts["feed"]["data"][0] } | |
describe "Get index" do | |
it "test get#index method" do | |
post = Post.create | |
get :index | |
expect(assigns(:posts)).to eq([post]) |
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
{ | |
"12": [ | |
{ | |
"counts": {"sent": 0}, | |
"datetime": "2015-02-14" | |
}, | |
{ | |
"counts": {"sent": 0}, | |
"datetime": "2015-02-15" | |
}, |
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
'use strict'; | |
/** | |
* @ngdoc directive | |
* @name veraxWebUiApp.directive:vxDroppable | |
* @description Directiva para el elemento que va a recibir los otros componentes | |
* @attributes | |
* # vxDroppable | |
*/ | |
angular.module('veraxWebUiApp') |
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
{"version":"1.0.0","nombre":"","paginas":[{"consecutivo":1,"secciones":[{"consecutivo":1,"numerocolumnas":1,"columnas":[{"consecutivo":1,"controles":[],"$$hashKey":"object:23"}],"$$hashKey":"object:20"}],"$$hashKey":"object:16"}]} |
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
<md-content ng-class="vm.class" ng-attr-flex-lg="{{vm.flex['lg']}}" ng-attr-flex-md="{{vm.flex['md']}}" ng-attr-flex-sm="{{vm.flex['sm']}}" | |
ng-attr-flex-gt-md="{{vm.flex['gt-md']}}" ng-attr-flex-gt-sm="{{vm.flex['gt-sm']}}"> | |
<ui-view name="header"></ui-view> | |
<ui-view name="content"></ui-view> | |
</md-content> |
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 possibleCombinationSum = function(arr, n) { | |
if (arr.indexOf(n) >= 0) { return true; } | |
if (arr[0] > n) { return false; } | |
if (arr[arr.length - 1] > n) { | |
arr.pop(); | |
return possibleCombinationSum(arr, n); | |
} | |
var listSize = arr.length, combinationsCount = (1 << listSize); | |
for (var i = 1; i < combinationsCount ; i++ ) { | |
var combinationSum = 0; |
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
const Object = ({ object, selection, onSelectItem }) => { | |
const {id} = object; | |
return ( | |
<div> | |
<span>{id}</span> | |
<div className="item-list"> | |
object.selectionType.items.edges.map(({ node }) => ( | |
<Item | |
key={node.__id} | |
item={node} |
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 QueryString = function () { | |
var query_string = {}; | |
var query = window.location.search.substring(1); | |
var vars = query.split("&"); | |
for (var i=0;i<vars.length;i++) { | |
var pair = vars[i].split("="); | |
query_string[pair[0]] = pair[1]; | |
} | |
return query_string; |
OlderNewer