今日までPhoenix v0.9.0を使っていました。バグを修正するために master ブランチに切り替えましたが、実行中に次の警告が表示されますmix compile
。
warning: using do...end in views is deprecated, please use the new YourApp.Web definitions
web/view.ex:6: Youli.View (module)
私はそれをしたいです。どうすれば始められますか?
今日までPhoenix v0.9.0を使っていました。バグを修正するために master ブランチに切り替えましたが、実行中に次の警告が表示されますmix compile
。
warning: using do...end in views is deprecated, please use the new YourApp.Web definitions
web/view.ex:6: Youli.View (module)
私はそれをしたいです。どうすれば始められますか?
今週末に 0.10 がリリースされたときに、ここで役立ついくつかのアップグレード ガイドの草案を作成する予定ですが、今のところ、これで準備が整います。
1) にMyApp.Web
ファイルを追加しますweb/
。ここでモデル化してください:
https://github.com/phoenixframework/phoenix/blob/master/priv/template/web/web.ex
2)web/view.ex
using
ブロックを新しいweb/web.ex
ブロックに移行します。消去。web/view.ex
.
2) すべてのビューを次のように更新します: https://github.com/phoenixframework/phoenix/blob/master/priv/template/web/views/page_view.ex#L2
3) 次のようにすべてのコントローラーを更新します: https://github.com/phoenixframework/phoenix/blob/master/priv/template/web/controllers/page_controller.ex#L2
それが役立つことを願っています!