[http://www.meetup.com/React-Berlin/events/221080348/](React Berlin - Meetup #1 - React Berlin)
Peter Magenheimer (@peterjmag)
I'm a front end developer at ResearchGate. And yes, we're hiring.
[http://www.meetup.com/React-Berlin/events/221080348/](React Berlin - Meetup #1 - React Berlin)
Peter Magenheimer (@peterjmag)
I'm a front end developer at ResearchGate. And yes, we're hiring.
2015-01-29 Unofficial Relay FAQ
Compilation of questions and answers about Relay from React.js Conf.
Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.
Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).
child_coll = Mongoid.default_session[:children] | |
Parent.all.each do |p| | |
p.childs.all.each do |c| | |
c.attributes['parent_id'] = p.id | |
child_coll.insert c.attributes # save children to separate collection | |
end | |
p.childs = nil # remove embedded data |
class LoLSerializer < ActiveModel::Serializer | |
... | |
hash["super_trooper"] = options[:super_trooper] | |
... | |
end | |
.. | |
#Usage: | |
ActiveModel::ArraySerializer.new(ololol_collection, | |
each_serializer: LoLSerializer, super_trooper: params[:super_trooper]).to_json |
class Interval < ActiveRecord::Base | |
validates_presence_of :start_date, :end_date | |
# Check if a given interval overlaps this interval | |
def overlaps?(other) | |
(start_date - other.end_date) * (other.start_date - end_date) >= 0 | |
end | |
# Return a scope for all interval overlapping the given interval, including the given interval itself |
Factory.define :item do |f| | |
include ActionDispatch::TestProcess | |
f.name "Macbook Pro 15" | |
f.price_in_dollars 1500 | |
f.photo fixture_file_upload('/files/avatar.jpg', 'image/jpg') | |
end |
ln -s /home/Data1 /home/Stores/abc | |
ln -f -s /home/Data2 /home/Stores/abc |
def available_types | |
ClassName.state_machines[:message_type].states.map &:name | |
end |
... | |
cell.recalculate | |
... | |
class Sheet | |
def build_sheet | |
... | |
cell = ValueCell.new(self,"A1","A2") | |
... | |
cell.recalculate |