A (more) complete cheatsheet for Arel, including NamedFunction functions, raw SQL and window functions.
posts = Arel::Table.new(:posts)
posts = Post.arel_table # ActiveRecord
Rich Hickey | |
https://confreaks.tv/videos/railsconf2012-keynote-simplicity-matters | |
https://confreaks.tv/videos/jaxconf2012-keynote-the-value-of-values | |
Dave Thomas | |
https://confreaks.tv/videos/elixirconf2014-opening-keynote-think-different | |
https://confreaks.tv/videos/lonestarruby2013-elixir-power-of-erlang-joy-of-ruby | |
Robert Martin | |
https://confreaks.tv/videos/rubymidwest2011-keynote-architecture-the-lost-years |
# In most cases, a single Rails app will be attached to a single repo | |
# As of Rails 5.1, initializing a new project will also automatically initialize Git | |
# This is perfect in most circumstances, but at App Academy, students have homework and | |
# project repos that contain multiple rails apps inside them | |
# To account for this without pushing the submodules, students need to remove the .git | |
# directory before adding and commiting the new project, but most do not, resulting in |
module Arel::Predications | |
def has_key(right) | |
Arel::Nodes::HasKey.new(self, quoted_node(right)) | |
end | |
end | |
class Arel::Nodes::HasKey < Arel::Nodes::Binary | |
def operator; :"?" end | |
end |
module Arel::Predications | |
def any(right) | |
Arel::Nodes::Any.new(self, quoted_node(right)) | |
end | |
end | |
class Arel::Nodes::Any < Arel::Nodes::Binary | |
def operator | |
:'ANY' | |
end |
People
![]() :bowtie: |
π :smile: |
π :laughing: |
---|---|---|
π :blush: |
π :smiley: |
:relaxed: |
π :smirk: |
π :heart_eyes: |
π :kissing_heart: |
π :kissing_closed_eyes: |
π³ :flushed: |
π :relieved: |
π :satisfied: |
π :grin: |
π :wink: |
π :stuck_out_tongue_winking_eye: |
π :stuck_out_tongue_closed_eyes: |
π :grinning: |
π :kissing: |
π :kissing_smiling_eyes: |
π :stuck_out_tongue: |