phoenix-framework

    0熱度

    1回答

    當我運行mix edeliver build release production --verbose A remote command failed on: [email protected] 我得到這個錯誤,但是當我登錄到服務器,花好月圓(因此混合)似乎安裝罰款。 ssh [email protected] [email protected]:~$ mix -v Erlang

    1熱度

    1回答

    我正在開發一個使用Elixir/Phoenix的後端。該後端將被幾個前端使用,並且每個人都需要使用不同的smtp服務器/配置發送電子郵件。 如何用竹郵件實現這一目標?

    0熱度

    2回答

    我想包裝和元素在一個a標記,但只給出一定的條件。 代碼看起來像這樣,但我確定必須有更好的方法。 <%= if condition do %> <a href="/"> <% end %> <p>Text</p> <%= if condition do %> </a> <% end %> 什麼是更好的方式來寫這個?

    0熱度

    1回答

    我想在用戶從我的下拉列表中選擇「Other」後在表單字段的Phoenix.HTML中生成text_input <select>,但我不確定用於執行操作的語法所以在鳳凰城的標記 我想這是一些與if或case語句,也許在選擇採用選擇,但我又不能確定 <div class="form-group"> <%= label f, :field, class: "control-label" %> <%=

    0熱度

    1回答

    我加入了login_as標籤我的測試和鳳凰開始給那個例外: defmodule Rumbl.VideoControllerTest do use Rumbl.ConnCase setup %{conn: conn} = config do if username = config[:login_as] do user = insert_user(user

    0熱度

    1回答

    所以在我的鳳凰應用程序我有這樣的警告: 警告:Dict.merge/2已過時,使用地圖模塊與地圖或關鍵字模塊工作 與關鍵字工作名單 測試/支持/ test_helpers.ex:6 changes = Dict.merge(%{ name: "Some User", username: "user#{Base.encode16(:crypto.strong_rand_bytes

    2熱度

    1回答

    我有一個Country: mix phx.gen.html Location Country countries name slug:unique 鏈接到一個Country我想用slug而不是id。我怎樣才能實現這個代碼將鏈接到slug(例如http://localhost:4000/countries/germany)? <%= link "Show", to: country_path(@

    1熱度

    1回答

    我有這樣的模板,它的正常工作 <h2>Listing videos</h2> <table class="table"> <thead> <tr> <th>User</th> <th>Url</th> <th>Title</th> <th>Description</th> <th>Category</th>

    0熱度

    1回答

    我有兩個型號 - Organization和User 組織有許多用戶,也屬於一個所有者(老闆是User模型太)。 我報名形式組織,在那裏用戶可以爲組織和name和password爲user進入name(user是在形式上organization嵌套對象)。成功註冊後,我需要有一個Organization及相關的owner(User模型),並且此user應屬於此組織。所以基本上,創建用戶應該是own

    0熱度

    2回答

    我目前正在測試控制器,該控制器使用函數create_zone,該函數依賴於檢索用戶將所述用戶關聯到區域的功能,然後創建只是兩者的關聯表的參與者條目條目。 def create_zone(attrs \\ %{}, user_id) do user = Accounts.get_user!(user_id) with{:ok, %Zone{} = zone} <- %Zone{