~kameliya/rouge

4ba48f6f40d3c3c545c7c119bda7e70eb9079363 — Yuki Izumi 5 years ago cb222b8
Update Rails example.
1 files changed, 8 insertions(+), 5 deletions(-)

M README.md
M README.md => README.md +8 -5
@@ 47,11 47,14 @@ What about in Rails?

```
$ rails console -- -rrouge
Loading development environment (Rails 3.2.6)
1.9.3p194 :002 > Rouge.repl
user=> (.where ruby/Content {:id 1})
  Content Load (0.7ms)  SELECT "contents".* FROM "contents" WHERE "contents"."id" = 1
[#<Content id: 1, content_group_id: 1, name: "welcome", content: "blah blah", created_at: "2012-08-26 11:30:50", updated_at: "2012-08-26 11:50:27", order: nil>]
Loading development environment (Rails 4.0.1)
irb(main):001:0> Rouge.repl
Rouge 0.0.16
user=> Entry
ruby/Entry
user=> (.where Entry {:id 1})
  Entry Load (10.5ms)  SELECT "entries".* FROM "entries" WHERE "entries"."id" = 1
#<ActiveRecord::Relation [#<Entry id: 1, user_id: 1, source: "xyz", rendered: "<p>xyz</p>", created_at: "2014-12-20 05:15:28", updated_at: "2015-07-01 10:28:27", timezone: "Australia/Sydney">]>
user=>
```