Sandthorn Product Example

Listing Active Record products

New product

Name Price Stock status
смч 123 outofstock Show Edit Destroy
ll 0 Show Edit Destroy
sfsdaa 23421 outofstock Show Edit Destroy
test 800 outofstock Show Edit Destroy
test123 1231 instock Show Edit Destroy
sssssssssss 12456 instock Show Edit Destroy
test79 79 instock Show Edit Destroy

Active Record database table (products)

{"id"=>"22", "name"=>"смч", "price"=>"123", "stock_status"=>"outofstock", "created_at"=>"2017-07-10 10:43:55.370493", "updated_at"=>"2017-08-03 19:37:12.334108"}

{"id"=>"23", "name"=>"ll", "price"=>"0", "stock_status"=>nil, "created_at"=>"2017-08-05 13:50:40.369284", "updated_at"=>"2017-08-05 13:50:40.369284"}

{"id"=>"5", "name"=>"sfsdaa", "price"=>"23421", "stock_status"=>"outofstock", "created_at"=>"2014-08-13 14:18:37.997119", "updated_at"=>"2015-07-23 17:45:03.592854"}

{"id"=>"19", "name"=>"test", "price"=>"800", "stock_status"=>"outofstock", "created_at"=>"2016-08-15 17:02:24.269044", "updated_at"=>"2016-08-17 22:00:46.19303"}

{"id"=>"16", "name"=>"test123", "price"=>"1231", "stock_status"=>"instock", "created_at"=>"2015-07-23 17:45:22.694694", "updated_at"=>"2016-08-17 22:02:09.781016"}

{"id"=>"6", "name"=>"sssssssssss", "price"=>"12456", "stock_status"=>"instock", "created_at"=>"2014-08-15 08:12:00.738468", "updated_at"=>"2017-01-13 10:32:25.912109"}

{"id"=>"20", "name"=>"test79", "price"=>"79", "stock_status"=>"instock", "created_at"=>"2017-04-28 11:36:09.717674", "updated_at"=>"2017-04-28 11:36:09.717674"}