fix style code in view and refactor code

parent f17e21bc
Pipeline #1390 failed with stages
in 0 seconds
...@@ -12,8 +12,6 @@ module ApplicationHelper ...@@ -12,8 +12,6 @@ module ApplicationHelper
end end
def current_page?(*paths) def current_page?(*paths)
return true if paths.include?(request.path) paths.include?(request.path)
false
end end
end end
...@@ -6,7 +6,7 @@ h2.text-center.form-title ...@@ -6,7 +6,7 @@ h2.text-center.form-title
= render 'shared/error_messages' = render 'shared/error_messages'
= f.hidden_field :job_id = f.hidden_field :job_id
= f.label :name = f.label :name
= f.text_field :name, required: true,length: { maximum: 200 }, placeholder: "Type name...", class: 'form-control' = f.text_field :name, required: true, length: { maximum: 200 }, placeholder: "Type name...", class: 'form-control'
= f.label :email = f.label :email
= f.text_field :email, required: true, length: { maximum: 255 }, format: { with: ApplyJob::VALID_EMAIL_REGEX}, placeholder: "Type email...", class: 'form-control' = f.text_field :email, required: true, length: { maximum: 255 }, format: { with: ApplyJob::VALID_EMAIL_REGEX}, placeholder: "Type email...", class: 'form-control'
......
class RemoveCvFromApplyJobs < ActiveRecord::Migration[6.1] class RemoveCvFromApplyJobs < ActiveRecord::Migration[6.1]
def change def change
remove_column :apply_jobs, :cv, :binary remove_column :apply_jobs, :cv
end end
end end
require "test_helper"
class ApplyJobMailerTest < ActionMailer::TestCase
test "create_apply" do
mail = ApplyJobMailer.create_apply
assert_equal "Create apply", mail.subject
assert_equal ["to@example.org"], mail.to
assert_equal ["from@example.com"], mail.from
assert_match "Hi", mail.body.encoded
end
end
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