Skip to content

Instantly share code, notes, and snippets.

@tarky
Created June 22, 2015 04:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tarky/8488ecc39c1d34f6bbe0 to your computer and use it in GitHub Desktop.
Save tarky/8488ecc39c1d34f6bbe0 to your computer and use it in GitHub Desktop.
limit column by hirb
> extend Hirb::Console
=> main
> table User.last(10), fields: [:id, :name]
User Load (1.5ms) SELECT `users`.* FROM `users` ORDER BY `users`.`id` DESC LIMIT 10
+----+----------------+
| id | name |
+----+----------------+
| 63 | chany0u |
| 64 | ae06710 |
| 65 | ps_lain_bot |
| 66 | harada4atsushi |
| 67 | masatrora |
| 68 | masamirock |
| 69 | daisuke_3 |
| 70 | takuya_v_v |
| 71 | pugiemonn |
| 72 | Tarky |
+----+----------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment