Skip to content

Instantly share code, notes, and snippets.

@folivi
folivi / search_controller.rb
Created June 23, 2015 10:21
Select2 & rails
class SearchController < ApplicationController
respond_to :json
def index
render json: @your_results, each_serializer: YourSerializer , root: :results
end
end
@folivi
folivi / app.js.coffee
Last active August 29, 2015 14:24
ngRoute & rails
@app = angular.module('Sports', [
'ngRoute', 'ngResource'
])
@app.config ($routeProvider, $locationProvider) ->
$locationProvider.html5Mode
enabled: true
requireBase: false
$routeProvider
.when '/sports/:id',
@folivi
folivi / aroundme.jsx
Created November 16, 2015 20:08
ReactJs render issue
var includes =function(arr, val){
return(arr.indexOf(val) !== -1);
};
var AroundMe = React.createClass({
getInitialState: function(){
return({
dances: [],
events: this.props.events,
user_coords: {},
@folivi
folivi / event-detail.js
Created May 19, 2016 00:00
router issue in reactNative
import React, { Component } from 'react';
import {
Text,
View,
} from 'react-native';
export default class EventDetail extends Component {
render() {
return (
<View>
//
// NewsFeedVM-extension.swift
// Bayello
//
// Created by Aboussa Folivi FOLLY on 01/03/2019.
// Copyright © 2019 Aboussa Folivi FOLLY. All rights reserved.
//
import Foundation
import UIKit