This file contains 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 Findable | |
extend ActiveSupport::Concern | |
# When you use uuid some methods stop to work as expected. Using this concern in your models will do the job. | |
# Override methods on module FinderMethods that use id as default order when no order is defined | |
# It's a working in progress | |
# referencer: | |
# http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-take | |
# https://github.com/rails/rails/blob/f52354ad1d15120dcc5284714bee7ee3f052986c/activerecord/lib/active_record/relation/finder_methods.rb#L503 | |
module ClassMethods |
This file contains 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(shapes). | |
-export([perimeter/1,area/1, bits/1]). | |
% Sample call, shapes:perimeter({square,{4}}) should return 16. | |
perimeter({square, {Side}}) -> | |
Side * 4; | |
% Sample call, shapes:perimeter({triangule,{4,3,5}}) should return 12. | |
perimeter({triangule,{SideA, SideB, SideC}}) -> | |
SideA + SideB + SideC. |
This file contains 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
import Ember from 'ember'; | |
import { task, timeout} from 'ember-concurrency'; | |
const { inject } = Ember; | |
const DEBOUNCE_MS = 600; | |
export default Ember.Component.extend({ | |
intl: inject.service(), | |
store: inject.service(), | |
allowClear: true, |