Class.where(method: value) Class.where(method: [value1, value2]) user = User.find(41) orders = Order.group('amount') orders = Order.order(:amount).reverse User.where.not(id: id) items = Item.where.not(id: items_not_included) names = Item.pluck('name') Author.joins(:books).merge(Book.available) .unscope .lock .collect
Last active
February 4, 2017 06:36
-
-
Save edilenedacruz/f23d3fb23b7be2d011bdb60c0f5da003 to your computer and use it in GitHub Desktop.
ActiveRecord methods
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment