diff --git a/app/assets/stylesheets/styles.css b/app/assets/stylesheets/styles.css index 7cc3f72..20732c6 100644 --- a/app/assets/stylesheets/styles.css +++ b/app/assets/stylesheets/styles.css @@ -76,7 +76,7 @@ ul, ol { list-style-position: inside; - margin: 1.5rem 0 1.5rem 1.5rem; + margin: 0 0 1.5rem 1.5rem; } em { diff --git a/app/controllers/categories_controller.rb b/app/controllers/categories_controller.rb index 19aa7a8..e255b91 100644 --- a/app/controllers/categories_controller.rb +++ b/app/controllers/categories_controller.rb @@ -15,7 +15,8 @@ def show end def new - @category = Category.new(name: "New Category", context: @question.context.name) + @category = Category.new(name: "New Category", context: @question.context.name) + @context = @question.context end def create diff --git a/app/jobs/category_suggestions_job.rb b/app/jobs/category_suggestions_job.rb index cdbcc49..9a91e3b 100644 --- a/app/jobs/category_suggestions_job.rb +++ b/app/jobs/category_suggestions_job.rb @@ -8,7 +8,6 @@ class CategorySuggestionsJob def perform(context_id) Rails.logger.info("CategorySuggestionsJob running with context id #{context_id}") return unless context = Context.find(context_id) - sleep(2) context.suggest_categories context.update_attribute(:suggestions_updated_at, DateTime.now) end diff --git a/app/views/categories/new.html.erb b/app/views/categories/new.html.erb index f2c8fb9..550568d 100644 --- a/app/views/categories/new.html.erb +++ b/app/views/categories/new.html.erb @@ -2,15 +2,32 @@