Commit bc1b104a by Xuan Trung Le

update flash_message

parent 81c4f237
......@@ -14,3 +14,7 @@
//= require_tree .
//= require javascripts/jquery-3.2.1.min.js
//= require javascripts/bootstrap.min.js
$(document).ready(function(){
$('#message').delay(5000).fadeOut('slow');
});
class Industry < ApplicationRecord
<<<<<<< 28eda34d875adbaa9af263755cbdb98465bc5939
has_many :industries_jobs
has_many :jobs, through: :industries_jobs
......@@ -11,19 +10,4 @@ class Industry < ApplicationRecord
order(jobs_count: :desc) }
scope :availble_job, -> { where('jobs_count > 0')}
=======
has_and_belongs_to_many :jobs
scope :top_industries, -> { select('industries.id, industries.name AS name, COUNT(jobs.id) AS jobs_count').
joins(:jobs).
group('industries.id').
order('jobs_count DESC, name').
limit(9) }
scope :industry_list, -> { select('industries.id, industries.name AS name, COUNT(jobs.id) AS jobs_count').
joins(:jobs).
# where('jobs_count >= 1').
group('industries.id').
order('jobs_count DESC, name') }
>>>>>>> Create the TOP, industry_list, city_list, job_detail pages.
end
<% flash.each do |name, msg| %>
<div class="alert alert-info alert-dismissable fade in" style="position: fixed; right: 0">
<div class="alert alert-info alert-dismissable fade in" style="position: fixed; right: 0" id="message">
<a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
<strong><%= "#{name}!" %></strong> <%= msg %>
</div>
......
......@@ -10,6 +10,7 @@
<body>
<%= render "layouts/menu" %>
<%= render "layouts/flash" %>
<%= yield %>
<%= render "layouts/footer" %>
</body>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment