Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

教程中代码片段的形式调查 #2

Open
chenxsan opened this issue Feb 6, 2017 · 2 comments
Open

教程中代码片段的形式调查 #2

chenxsan opened this issue Feb 6, 2017 · 2 comments

Comments

@chenxsan
Copy link
Owner

chenxsan commented Feb 6, 2017

目前教程中涉及的代码片段都是 git log -p 的结果,示例如下:

diff --git a/web/controllers/recipe_controller.ex b/web/controllers/recipe_controller.ex
index 96a0276..832ca52 100644
--- a/web/controllers/recipe_controller.ex
+++ b/web/controllers/recipe_controller.ex
@@ -1,5 +1,6 @@
 defmodule TvRecipe.RecipeController do
   use TvRecipe.Web, :controller
+  plug :login_require when action in [:new, :create, :edit, :update, :delete]

   alias TvRecipe.Recipe

不知道这样的形式有没有问题。

如果觉得能接受,请点击 +1,无法接受,请点击 -1。

或者有其它建议,可以附在评论中。

cc @torghay, @nanlong.

@torghay
Copy link

torghay commented Feb 7, 2017 via email

@nanlong
Copy link

nanlong commented Feb 11, 2017

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants