7
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Rails4.2の新機能についてパート2

Posted at

Rails4.2の新機能

Rails4.2から追加される機能について調べているので、そのメモの第2弾です。適宜修正したりします。

Web Console

web上でrubyのコンソールを立ち上げることができます。viewのソース上に以下のように記述するだけです

app/views/users/console.html.erb
<%= console %>

上記のようなファイルを作成し、controllerやroutes.rbに必要なコードを追加し実行するとWeb Consoleが立ち上がります。

スクリーンショット 2014-10-01 18.41.05.png

rails consoleのようにmodelの検証などもできます

User.create(name: 'test', age: 30)
User.all

その他

他の機能はまた後日

7
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?