# lib/generators/rails/policy/policy_generator.rb
module Rails
module Generators
class PolicyGenerator < NamedBase
source_root File.expand_path('templates', __dir__)
def copy_policy_file
This file contains hidden or 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.hidden_field field, data: { quill: { target: "input" } } %> | |
| <div style="min-height:500px;" data-quill-target="editor" data-action="click->quill#focus"></div> |
This file contains hidden or 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
| <!-- app/components/dropdown/component.html.erb --> | |
| <div class="relative inline-block text-left" data-controller="dropdown--component"> | |
| <div> | |
| <button type="button" | |
| class="inline-flex justify-center w-full rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-indigo-500" | |
| data-action="click->dropdown--component#toggleMenu" | |
| aria-haspopup="true" | |
| aria-expanded="true"> | |
| <%= @title %> | |
| <!-- Heroicon name: solid/chevron-down --> |
This file contains hidden or 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
| $columns: 12; | |
| $gap: 30px; | |
| $breakpoints: ( | |
| xs: 480px, | |
| sm: 768px, | |
| md: 960px, | |
| lg: 1170px, | |
| xl: 1280px | |
| ); |
This file contains hidden or 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
| #!/bin/bash | |
| set -e | |
| export CONFIG_MODULE_SIG=n | |
| export CONFIG_MODULE_SIG_ALL=n | |
| # For current kernel | |
| export KERNELRELEASE=$(cat /proc/version | awk '{print $3}') | |
| temp_dir=$(mktemp -d) | |
| echo "Installing FacetimeHD camera for $KERNELRELEASE" |
A Guide to setup and use Plantuml
- JRE: https://adoptopenjdk.net/
- GraphViz: https://graphviz.org/download/
- VSCode IDE: https://code.visualstudio.com/Download
- vs code Plugin: https://marketplace.visualstudio.com/items?itemName=jebbs.plantuml
This is all you really need to know in order to make Action Mailbox work in development.
- Fire up
ngrok http 3000and make note of your subdomain for steps 3 and 8. - Create a Mailgun account because they offer sandbox addresses; grab your domain from the Dashboard.
- Go into Receiving and create a catch-all route pointing to:
https://XXX.ngrok.io/rails/action_mailbox/mailgun/inbound_emails/mime - Add your Mailgun API key to your credentials:
action_mailbox:
mailgun_api_key: API KEY HERE
This file contains hidden or 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
| // How to use it: import this function from another file and run it | |
| // import DisableBack from 'BrowserHistory'; | |
| // DisableBack(); | |
| // intercept browser's back button action and disable it | |
| function DisableBack() { | |
| window.history.pushState(null, null, window.location.href); | |
| window.onpopstate = function onPopState() { | |
| window.history.go(1); | |
| }; |