我正在尝试在1事件上添加一个确认,它在Firefox上运行,但在chrome上不起作用,之前它也在chrome上运行,但现在不行。
现在确认框出现了,但是很快消失了,它闪烁了。
下面是此代码:
$('.job_form').on('submit', function(e) {
if (!confirm("If this job is posted to more than 1 person, it will go to the first person that accepts it.")) {
e.preventDefault();
return false;
}
});
Run Code Online (Sandbox Code Playgroud)
<%= form_with(model: job, html: {"data-parsley-validate" => '', class: 'job_form'}, local: true) do |f| %>
// html fields
<%= render partial: 'form2', locals: {f: f} %>
<% end %>
Run Code Online (Sandbox Code Playgroud)
下面是form2
//html fields
<div id="isAllDiv"></div>
<div class="col-md-12 text-center">
<%= f.submit 'Post Job', class: 'btn btn-primary signin-btn' %>
//html code …Run Code Online (Sandbox Code Playgroud) 我在表中有两个时间字段,即start_time and end_time. 当我执行时MyModel.save(start_time: '12:34'),它会通过附加一个date(Sat, 01 Jan 2000 07:25:00 UTC +00:00). 我只想节省时间。我在用Rails5
我正在将回形针与 S3 存储桶集成到RAILS 5. 我指的是https://coderwall.com/p/vv1iwg/set-up-ruby-on-rails-with-paperclip-5-and-s3-using-aws-sdk-v2。我在我的 development.rb 中写了以下内容:
config.paperclip_defaults = {
storage: :s3,
s3_region: 'us-west-2',
s3_credentials: {
bucket: 'mybucket',
access_key_id: 'my id',
secret_access_key: 'my secret key'
}
}
Run Code Online (Sandbox Code Playgroud)
上传图片时出现以下错误:
NameError (uninitialized constant Aws::VERSION):
Run Code Online (Sandbox Code Playgroud)
我正在使用 3.0.1 版 gem aws-sdk