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
import Component from '@glimmer/component'; | |
export default class extends Component { | |
constructor() { | |
super(...arguments); | |
// connections is provided here and is the same as @connections in the hbs file | |
const connections = this.args.connections | |
// 1) Apply the class "alert-info" to the first connection | |
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
import Component from '@glimmer/component'; | |
export default class extends Component { | |
activeIndex = 0; | |
constructor(owner, args) { | |
super(owner, args); // what is owner? | |
// connections is provided here and is the same as @connections in the hbs file | |
const connections = args.connections | |
connections[this.activeIndex].active = true; | |
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
import Controller from '@ember/controller'; | |
export default class ApplicationController extends Controller { | |
appName = 'Ember Twiddle TEST'; | |
} |
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
schema_path = [0, 1, 2].map do |n| | |
File.join("prod-backup", "schemas", (Time.current - n.days).strftime("%Y_%m_%d")) | |
end.select do |filepath| | |
File.exist? File.join(File::SEPARATOR, "Volumes", filepath) | |
end.first || "file not found" | |
# changed to: | |
n = 0; schema_path = "file not found"; | |
while n < 3 && schema_path == "file not found" do |