Refactoring

Refactoring

<%= for job <- @work_experience do %>

<%= link job.title, to: user_work_experience_path(@conn, :show, @user, job) %>
      <%= if same_user?(@user, @current_user) do %>
      <%= button to: user_work_experience_path(@conn, :delete, @user, job), method: :delete, class: "job__edit button button-link button--icon button--small", form: [class: "job__edit button button-link button--icon button--small"] do %>

      <% end %>
      <%= link to: user_work_experience_path(@conn, :edit, @user, job), class: "job__edit button button-link button--icon button--small"  do %>

      <% end %>
      <% end %>

    <%= job.organization %>

      <%= if(Vutuv.WorkExperience.has_start_date? job) do %>
        <%= if job.start_month do %>
          <%= "#{job.start_month}/" %>
        <%= end %>
        <%= "#{job.start_year} - " %>
      <% end %>
      <%= if(Vutuv.WorkExperience.has_end_date? job) do %>
        <%= if job.end_month do %>
          <%= "#{job.end_month}/" %>
        <%= end %>
        <%= "#{job.end_year}" %>
      <% else %>
        Present
      <% end %>

<% end %>

<%= for job <- @work_experience do %>

<%= link job.title, to: user_work_experience_path(@conn, :show, @user, job) %>
      <%= if same_user?(@user, @current_user) do %>
      <%= button to: user_work_experience_path(@conn, :delete, @user, job), method: :delete, class: "job__edit button button-link button--icon button--small", form: [class: "job__edit button button-link button--icon button--small"] do %>

      <% end %>
      <%= link to: user_work_experience_path(@conn, :edit, @user, job), class: "job__edit button button-link button--icon button--small"  do %>

      <% end %>
      <% end %>

    <%= job.organization %>

      <%= if(Vutuv.WorkExperience.has_start_date? job) do %>
      <%= if job.start_month do %>
        <%= "#{job.start_month}/#{job.start_year} -" %>
      <%= else %>
        <%= "#{job.start_year} -" %>
      <%= end %>
      <% end %>
      <%= if(Vutuv.WorkExperience.has_end_date? job) do %>
      <%= if job.end_month do %>
        <%= "#{job.end_month}/#{job.end_year}" %>
      <%= else %>
        <%= "#{job.end_year}" %>
      <%= end %>
      <% else %>
      Present
      <% end %>

<% end %>


fix typo, direct to homeJoin

fix typo, direct to homeJoin

<% signup_link = "https://brandnewcongress.org/#homeJoin?ref=#{@code}" %>

      You've successfully claimed your recruiter code: <%= @code %>

        Your signup link is
        <a href="<%= signup_link %>" style="color: white;" target="_blank">
          <%= signup_link %>
        .

        Anyone who signs up after clicking on that link will be tracked as one
        of your signups, which will be tracked in our leaderboard.

<% signup_link = "https://brandnewcongress.org?ref=#{@code}" %>

      You've successfully claimed your recuirter code: <%= @code %>

        Your signup link is
        <a href="<%= signup_link %>" style="color: white;" target="_blank">
          <%= signup_link %>
        .

        Anyone who signs up after clicking on that link will be tracked as one
        of your signups, which will be tracked in our leaderboard.


Fix connect template

Fix connect template

#!/usr/bin/env bash

# This uses `$app@localhost` address to connect to the erlang node.
# That is meant to be executed from the same machine where the erlang node lives
#
# To connect to your app from another machine, you should set the same cookie
# for both, set node's name to sommething like `$app@$IPaddr`
# and ensure networks are visible.

app="<%= app %>"
cookie="<%= cookie %>"

# connect with interactive erlang via iex
cmd="iex --name connector@127.0.0.1 --cookie $cookie --remsh $app@127.0.0.1"
$cmd

########################################
#
#     Some ways to run your app:
#
#     To run (embedded erlang):
#     ```
#         run_erl -daemon /home/$user/$app/pipes/ /home/$user/$app/log
#           "erl -boot $dir/boot/start
#                -config $dir/boot/sys
#                -env ERL_LIBS $dir/lib
#                -sname $app"
#     ```
#
#     To connect (embedded erlang):
#     ```
#         to_erl /home/$user/$app/pipes/erlang.pipe.1
#     ```
#
#     To run (interactive erlang):
#     ```
#         erl -boot $dir/boot/start
#             -config $dir/boot/sys
#             -env ERL_LIBS $dir/lib
#             -name $app@localhost
#     ```
#
#     To run (interactive elixir, using app's own `iex`):
#     ```
#         erl -boot $dir/boot/start
#             -config $dir/boot/sys
#             -env ERL_LIBS $dir/lib
#             -name $app@localhost
#             -noshell -user Elixir.IEx.CLI -extra --no-halt
#     ```
#
#     To run (detached elixir):
#     ```
#         iex --erl "-boot $dir/boot/start
#                    -config $dir/boot/sys
#                    -env ERL_LIBS $dir/lib"
#             --name $app@localhost
#             --detached
#     ```
#
#     To run (detached erlang):
#     ```
#         erl -boot $dir/boot/start
#             -config $dir/boot/sys
#             -env ERL_LIBS $dir/lib
#             -name $app@localhost
#             -detached
#     ```
#
#     To connect (interactive elixir):
#     ```
#         iex --remsh $app@localhost --sname connector
#     ```
#
#     To connect (interactive erlang):
#     ```
#         erl -remsh $app@localhost -sname connector
#     ```
#
#     To connect (interactive elixir, using app's own `iex`):
#     ```
#         erl -remsh $app@localhost -sname connector
#         # and then ...
#         ($app@localhost)1> 'Elixir.IEx':start().
#     ```
#

#!/usr/bin/env bash

# This uses `$app@localhost` address to connect to the erlang node.
# That is meant to be executed from the same machine where the erlang node lives
#
# To connect to your app from another machine, you should set the same cookie
# for both, set node's name to sommething like `$app@$IPaddr`
# and ensure networks are visible.

app="<%= app %>"
cookie="<%= cookie %>"

# connect with interactive erlang via iex
cmd="iex --name connector@127.0.0.1 --setcookie $cookie --remsh $app@127.0.0.1"
$cmd

########################################
#
#     Some ways to run your app:
#
#     To run (embedded erlang):
#     ```
#         run_erl -daemon /home/$user/$app/pipes/ /home/$user/$app/log
#           "erl -boot $dir/boot/start
#                -config $dir/boot/sys
#                -env ERL_LIBS $dir/lib
#                -sname $app"
#     ```
#
#     To connect (embedded erlang):
#     ```
#         to_erl /home/$user/$app/pipes/erlang.pipe.1
#     ```
#
#     To run (interactive erlang):
#     ```
#         erl -boot $dir/boot/start
#             -config $dir/boot/sys
#             -env ERL_LIBS $dir/lib
#             -name $app@localhost
#     ```
#
#     To run (interactive elixir, using app's own `iex`):
#     ```
#         erl -boot $dir/boot/start
#             -config $dir/boot/sys
#             -env ERL_LIBS $dir/lib
#             -name $app@localhost
#             -noshell -user Elixir.IEx.CLI -extra --no-halt
#     ```
#
#     To run (detached elixir):
#     ```
#         iex --erl "-boot $dir/boot/start
#                    -config $dir/boot/sys
#                    -env ERL_LIBS $dir/lib"
#             --name $app@localhost
#             --detached
#     ```
#
#     To run (detached erlang):
#     ```
#         erl -boot $dir/boot/start
#             -config $dir/boot/sys
#             -env ERL_LIBS $dir/lib
#             -name $app@localhost
#             -detached
#     ```
#
#     To connect (interactive elixir):
#     ```
#         iex --remsh $app@localhost --sname connector
#     ```
#
#     To connect (interactive erlang):
#     ```
#         erl -remsh $app@localhost -sname connector
#     ```
#
#     To connect (interactive elixir, using app's own `iex`):
#     ```
#         erl -remsh $app@localhost -sname connector
#         # and then ...
#         ($app@localhost)1> 'Elixir.IEx':start().
#     ```
#