removes user_id column from User model to use idiomatic Rails automatic IDs
This commit is contained in:
@@ -62,7 +62,7 @@ $('#submit_button').click(function() {
|
||||
$("#editAcct").modal('hide');
|
||||
|
||||
$.ajax({
|
||||
url: "/admin/" + <%= @user.user_id %> + "/update_user.json",
|
||||
url: "/admin/" + <%= @user.id %> + "/update_user.json",
|
||||
data: valuesToSubmit,
|
||||
type: "POST",
|
||||
success: function(response) {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<span class="caret"></span>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li>
|
||||
<%= link_to "Account settings", user_account_settings_path(:user_id => current_user.user_id) %>
|
||||
<%= link_to "Account settings", user_account_settings_path(user_id: current_user.id) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to "Logout", logout_path %>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</li>
|
||||
<% end %>
|
||||
<li id="benefit_forms">
|
||||
<%= link_to user_benefit_forms_path(:user_id => current_user.user_id) do %>
|
||||
<%= link_to user_benefit_forms_path(user_id: current_user.id) do %>
|
||||
<div class="icon">
|
||||
<span class="fs1" aria-hidden="true" data-icon=""></span>
|
||||
</div>
|
||||
@@ -40,7 +40,7 @@
|
||||
<% end %>
|
||||
</li>
|
||||
<li id="retirement">
|
||||
<%= link_to user_retirement_index_path(:user_id => current_user.user_id) do %>
|
||||
<%= link_to user_retirement_index_path(user_id: current_user.id) do %>
|
||||
<div class="icon">
|
||||
<span class="fs1" aria-hidden="true" data-icon=""></span>
|
||||
</div>
|
||||
@@ -48,7 +48,7 @@
|
||||
<% end %>
|
||||
</li>
|
||||
<li id="pto">
|
||||
<%= link_to user_paid_time_off_index_path(:user_id => current_user.user_id) do %>
|
||||
<%= link_to user_paid_time_off_index_path(user_id: current_user.id) do %>
|
||||
<div class="icon">
|
||||
<span class="fs1" aria-hidden="true" data-icon=""></span>
|
||||
</div>
|
||||
@@ -56,7 +56,7 @@
|
||||
<% end %>
|
||||
</li>
|
||||
<li id="employee_info">
|
||||
<%= link_to user_work_info_index_path(:user_id => current_user.user_id) do %>
|
||||
<%= link_to user_work_info_index_path(user_id: current_user.id) do %>
|
||||
<div class="icon">
|
||||
<span class="fs1" aria-hidden="true" data-icon=""></span>
|
||||
</div>
|
||||
@@ -64,7 +64,7 @@
|
||||
<% end %>
|
||||
</li>
|
||||
<li id="performance">
|
||||
<%= link_to user_performance_index_path(:user_id => current_user.user_id) do %>
|
||||
<%= link_to user_performance_index_path(user_id: current_user.id) do %>
|
||||
<div class="icon">
|
||||
<span class="fs1" aria-hidden="true" data-icon=""></span>
|
||||
</div>
|
||||
@@ -72,7 +72,7 @@
|
||||
<% end %>
|
||||
</li>
|
||||
<li id="messages">
|
||||
<%= link_to user_messages_path(:user_id => current_user.user_id) do %>
|
||||
<%= link_to user_messages_path(user_id: current_user.id) do %>
|
||||
<div class="icon">
|
||||
<span class="fs1" aria-hidden="true" data-icon=""></span>
|
||||
</div>
|
||||
@@ -80,7 +80,7 @@
|
||||
<% end %>
|
||||
</li>
|
||||
<li id="pay">
|
||||
<%= link_to user_pay_index_path(:user_id => current_user.user_id) do %>
|
||||
<%= link_to user_pay_index_path(user_id: current_user.id) do %>
|
||||
<div class="icon">
|
||||
<span class="fs1" aria-hidden="true" data-icon=""></span>
|
||||
</div>
|
||||
@@ -139,4 +139,4 @@
|
||||
});
|
||||
|
||||
</script>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -111,7 +111,7 @@ $("#submit_button").click(function(event) {
|
||||
var valuesToSubmit = $("#send_message").serialize();
|
||||
event.preventDefault();
|
||||
$.ajax({
|
||||
url: <%= "/users/#{current_user.user_id}/messages.json".inspect.html_safe %>,
|
||||
url: <%= "/users/#{current_user.id}/messages.json".inspect.html_safe %>,
|
||||
data: valuesToSubmit,
|
||||
type: "POST",
|
||||
success: function(response) {
|
||||
@@ -135,4 +135,4 @@ $(document).ready(function () {
|
||||
makeActive()
|
||||
});
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -186,7 +186,7 @@ function parseDirectDepostInfo(response){
|
||||
function populateTable() {
|
||||
$('#data_table').dataTable().fnClearTable();
|
||||
$.ajax({
|
||||
url: <%= sanitize(user_pay_path(:format => "json", :user_id => current_user.user_id, :id => current_user.user_id).inspect) %>,
|
||||
url: <%= sanitize(user_pay_path(:format => "json", user_id: current_user.id, id: current_user.id).inspect) %>,
|
||||
type: "GET",
|
||||
success: function(response) {
|
||||
parseDirectDepostInfo(response);
|
||||
@@ -237,7 +237,7 @@ $("#decrypt_btn").click(function(event){
|
||||
var valuesToSubmit = $("#decrypt_form").serialize();
|
||||
event.preventDefault();
|
||||
$.ajax({
|
||||
url: <%= sanitize(decrypted_bank_acct_num_user_pay_index_path(:format => "json", :user_id => current_user.user_id).inspect) %>,
|
||||
url: <%= sanitize(decrypted_bank_acct_num_user_pay_index_path(:format => "json", user_id: current_user.id).inspect) %>,
|
||||
data: valuesToSubmit,
|
||||
type: "POST",
|
||||
success: function(response) {
|
||||
@@ -298,4 +298,4 @@ $(document).ready(
|
||||
populateTable()
|
||||
)
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<%= hidden_field_tag :url, @url%>
|
||||
<%= hidden_field_tag :url, @url %>
|
||||
<%= text_field_tag :email, params[:email], {:class => "input input-block-level", :placeholder=>"Email"} %>
|
||||
<%= password_field_tag :password, nil, {:class => "input input-block-level", :placeholder=>"Password"}%>
|
||||
</div>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
</div>
|
||||
<div class="widget-body">
|
||||
<%= form_for @user, :html => {:id => "account_edit"} do |f|%>
|
||||
<%= f.hidden_field :user_id%>
|
||||
<%= f.hidden_field :id %>
|
||||
<div class="control-group">
|
||||
<%= f.label :email, nil, {:class => "control-label"}%>
|
||||
<%= f.text_field :email, {:class => "span12"}%>
|
||||
@@ -84,7 +84,7 @@ $("#submit_button").click(function(event) {
|
||||
var valuesToSubmit = $("#account_edit").serialize();
|
||||
event.preventDefault();
|
||||
$.ajax({
|
||||
url: <%= "/users/#{current_user.user_id}.json".inspect.html_safe %>,
|
||||
url: <%= "/users/#{current_user.id}.json".inspect.html_safe %>,
|
||||
data: valuesToSubmit,
|
||||
type: "POST",
|
||||
success: function(response) {
|
||||
|
||||
Reference in New Issue
Block a user