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
<%= form_with(model: team) do |form| %> | |
<div> | |
<%= form.label :name %> | |
<%= form.text_field :name, class: "input" %> | |
</div> | |
<div> | |
<%= f.select :user_id, {}, {placeholder: "Select user"}, {class: "w-full", data: { controller: "select", select_url_value: users_path }} %> | |
</div> |
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
.spreadsheet--search.grid.grid-flow-col.grid-cols-auto.gap-0.auto-cols-fr.pl-1.pr-8.hidden{ data: { controller: "spreadsheet--search", action: "toggle-search@window->spreadsheet--search#toggleSearch" }} | |
.input.col-span-9.p-2 | |
%sl-input.w-full(placeholder="Search" size="small" clearable pill){ data: { target: "spreadsheet--search.input"}} | |
%sl-icon(name="search" slot="prefix") | |
%sl-dropdown(slot="suffix" placement="bottom-end" hoist){ data: { target: "spreadsheet--search.dropdown"}} | |
%sl-button(slot="trigger" caret type="text" size="small"){ data: { target: "spreadsheet--search.trigger"}} Highlight | |
%sl-menu | |
%sl-menu-item{ data: { target: "spreadsheet--search.higlight"}, checked: true} Highlight | |
%sl-menu-item{ data: { target: "spreadsheet--search.filter"}} Filter |
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
-# https://johnbeatty.co/2018/03/09/stimulus-js-tutorial-how-do-i-drag-and-drop-items-in-a-list/ | |
.grid--draggable{ 'data-controller': 'seating-plan', | |
'data-seating-plan-endpoint': endpoint, | |
'data-action': 'dragstart->seating-plan#onDragStart dragover->seating-plan#onDragOver dragenter->seating-plan#onDragEnter drop->seating-plan#onDrop dragend->seating-plan#onDragEnd' } | |
- seating_plan.each do |seat| | |
- if seat[:is_empty] | |
.grid__item.grid__item--empty{ 'data-row': seat[:row], | |
'data-col': seat[:col], | |
style: "grid-row: #{seat[:row]}; grid-column: #{seat[:col]};", | |
class: ('grid__item--border' if seat[:is_border]) } |
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
group :development, :test do | |
gem 'spring-commands-rspec', require: false | |
gem 'spring-watcher-listen', require: false | |
gem 'spring', require: false | |
# ... | |
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
############################################################################ | |
# # | |
# ------- Useful Docker Aliases -------- # | |
# # | |
# # Installation : # | |
# copy/paste these lines into your .bashrc or .zshrc file or just # | |
# type the following in your current shell to try it out: # | |
# wget -O - https://gist.githubusercontent.com/jgrodziski/9ed4a17709baad10dbcd4530b60dfcbb/raw/d84ef1741c59e7ab07fb055a70df1830584c6c18/docker-aliases.sh | bash | |
# # | |
# # Usage: # |
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
# simple_form Reform Form for creating a basic postal address | |
# errors will be shown on the violating fields | |
= simple_form_for(@form, remote: true) do |f| | |
.modal-dialog | |
.modal-content | |
.modal-header | |
%button.close{"aria-hidden" => "true", "data-dismiss" => "modal", :type => "button"} × | |
%h3.modal-title | |
New Address for | |
= @customer.name |
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
trix-toolbar .button_group button::before { | |
background-image: none !important; | |
font-family: 'FontAwesome'; | |
font-size: 12px; | |
line-height: 28px; | |
} | |
trix-toolbar .button_group button.bold:before { | |
content: '\f032'; | |
} |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> | |
<title>Navbar Template for Bootstrap</title> |
#Scoped Invitation System for User Groups with Rails#
Starting out with the following models and associations:
####User
- has_many :memberships
- has_many :organizations through :memberships
####Organization (User Group)
- has_many :memberships
NewerOlder