This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A sample Guardfile | |
# More info at https://github.com/guard/guard#readme | |
## Uncomment and set this to only include directories you want to watch | |
# directories %w(app lib config test spec features) \ | |
# .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")} | |
## Note: if you are using the `directories` clause above and you are not | |
## watching the project directory ('.'), then you will want to move | |
## the Guardfile to a watched dir and symlink it back, e.g. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- path: views/layouts/ --> | |
<% if object.errors.any? %> | |
<% object.errors.full_messages.each do |msg| %> | |
<%= | |
content_tag :div, :id => "has_errors", :style => "padding:3px; margin:0 20vw; background-color:rgba(246, 138, 138, 0.7); border:solid rgba(246, 138, 138, 1) 1px; border-radius:12px; text-align:center;" do | |
concat(content_tag :p, msg) | |
end | |
-%> | |
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= content_tag :div, :class => "gallery_rows" do -%> | |
<% gallery.photo.each do |image| %> | |
<%= content_tag :div, :class => "gallery_image", :id => "gallery_image_#{gallery.photo.index(image)+1}" do -%><%# delete by index %> | |
<%= content_tag :div, :class => "imagethumb" do -%> | |
<%= image_tag(image.thumb.url) if gallery.photo? -%> | |
<% end %> | |
<p>Delete photo?</p> | |
<div class="imageswitch"> | |
<%= check_box_tag 'delete_this_images[]', gallery.photo.index(image), | |
false, id: "delete_image_#{gallery.photo.index(image)+1}", class: 'imageswitch-cb' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def puma_pidfile # puma pid file path | |
@puma_pidfile = ENV['PIDFILE'] || "tmp/pids/puma.pid" | |
end | |
def puma_port # port where puma runs | |
@puma_port = ENV['PORT'] || "8080" | |
end | |
namespace :guard do | |