#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
#Scoped Invitation System for User Groups with Rails#
Starting out with the following models and associations:
####User
####Organization (User Group)
# first install blueutil, 'brew install blueutil' | |
# next create a new Keyboard Maestro macro | |
# add a Execute Shell Action action to script and paste in the following: | |
bluetooth=$(/usr/local/bin/blueutil) | |
is_on="Power: 1" | |
if [[ "$bluetooth" =~ "$is_on" ]]; | |
then | |
/usr/local/bin/blueutil power 0 | |
else |
addEventListener "trix-initialize", (event) -> | |
new TrixAutoLinker event.target | |
class TrixAutoLinker | |
constructor: (@element) -> | |
{@editor} = @element | |
@element.addEventListener("trix-render", @autoLink) | |
@autoLink() | |
autoLink: => |
BC.registerElement "bc-require", | |
createdCallback: -> | |
@setAttribute("pending", "") | |
attachedCallback: -> | |
BC.ready => | |
if Loader.find(@script)?.loaded | |
@activate() | |
else | |
@deactivate() |
import SwiftUI | |
private let linkDetector = try! NSDataDetector(types: NSTextCheckingResult.CheckingType.link.rawValue) | |
struct LinkColoredText: View { | |
enum Component { | |
case text(String) | |
case link(String, URL) | |
} |