Created
August 1, 2018 10:11
-
-
Save theachyutkadam/592ff13a4b389c5c3b7057e96d9538af to your computer and use it in GitHub Desktop.
This file contains hidden or 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
1) Product.where(payment_type: "borrow").update_all(product_name: 0) | |
2) Product.where(payment_type: "cash").update_all(product_name: 1) | |
3) Product.all.each do |product| | |
product.update(payment_type: product.price) | |
product.update(product_name: product.item_id) | |
end | |
4) Product.where(product_name "0").update_all(payment_type: "0") | |
5) product.update(product_name: product.item_id) | |
Product.where("Date(created_at) =?", "2018-07-25") | |
(show date vie record) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment