A (more) complete cheatsheet for Arel, including NamedFunction functions, raw SQL and window functions.
posts = Arel::Table.new(:posts)
posts = Post.arel_table # ActiveRecord
This is an example of how I combine interaction/service classes with Wisper event broadcasting in Rails.
In this example, I show a UsersController#create
API, a corresponding service object, and all the test code/listeners to make it all happen.
The outcome is:
object.save
in dozens of places.grep
for usage of it.