我创建了一个带有自定义滑块导航的滑块.这是代码看起来像:
<!-- Slider Parent -->
<div class="col-md-6 col-xs-12">
<div class="gallery slider-parent">
<% @activity.galleries.each_with_index do |gallery, index| %>
<%= image_tag gallery.documentation.url(:large, width: '100%') %>
<% end %>
</div>
</div>
<!-- Slider Navigation -->
<div class="col-md-6 col-xs-12">
<div class="slider-nav">
<% @activity.galleries.each_slice(3) do |galleries| %>
<div class="row">
<% galleries.each do |gallery| %>
<div class="col-md-4">
<a href="#"><%= image_tag gallery.documentation.url(:medium) %></a>
</div>
<% end %>
</div>
<% end %>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
这里的JS看起来像application.js:
// Image gallery
$('.gallery').slick( {
autoplay: true,
arrows: false
});
var …Run Code Online (Sandbox Code Playgroud) 我在这里阅读了类似的案例:Validation specific email specific domain devise 3 ruby on rails 4
但是,它只是一个电子邮件域(例如 example.com)。我想要的是允许我拥有的一些电子邮件域(例如 domain1.com、domain2.com、domain3.com 等)。如何做到这一点?