diff --git a/app/controllers/admin/i_websites_controller.rb b/app/controllers/admin/i_websites_controller.rb index 059bce0..93e9f0b 100644 --- a/app/controllers/admin/i_websites_controller.rb +++ b/app/controllers/admin/i_websites_controller.rb @@ -14,7 +14,7 @@ class Admin::IWebsitesController < ApplicationController def index - @i_websites = IWebsite.order(:name).all + @i_websites = IWebsite.order("p_customer_id ASC").all end @@ -45,7 +45,7 @@ class Admin::IWebsitesController < ApplicationController if @i_website.save - @i_websites = IWebsite.order(:name).all + @i_websites = IWebsite.order("p_customer_id ASC").all else render action: "new" @@ -61,7 +61,7 @@ class Admin::IWebsitesController < ApplicationController if @i_website.update_attributes(params.require(:i_website).permit!) - @i_websites = IWebsite.order(:name).all + @i_websites = IWebsite.order("p_customer_id ASC").all else render action: "edit" diff --git a/app/views/admin/i_websites/_i_website.html.haml b/app/views/admin/i_websites/_i_website.html.haml index 9f70fa5..3c13cb4 100644 --- a/app/views/admin/i_websites/_i_website.html.haml +++ b/app/views/admin/i_websites/_i_website.html.haml @@ -2,8 +2,8 @@ %td= i_website.p_customer.show_name if i_website.p_customer %td= i_website.name - %td=link_to i_website.url, i_website.url, :target => "_blank" - %td= i_website.prov_url + %td=link_to i_website.url.to_s, i_website.url.to_s, :target => "_blank" + %td=link_to i_website.prov_url.to_s, i_website.prov_url.to_s, :target => "_blank" %td= i_website.status