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
| #!/usr/bin/env ruby | |
| name = ARGV[0] | |
| if name.to_s.strip.empty? | |
| puts "usage: bin/create_engine <name>" | |
| exit(1) | |
| end | |
| cmd = <<-CMD | |
| bin/rails plugin new engines/#{name}_engine \ |
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
| class Api::ApplicationController < ActionController::API | |
| include Pagy::Backend | |
| include PagyCollectionSerializer::ControllerMixin | |
| end |
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 "@hotwired/stimulus"; | |
| /** | |
| * 响应式属性控制器 / Responsive Attribute Controller | |
| * | |
| * 这个控制器用于根据屏幕尺寸动态改变元素的属性值。 | |
| * This controller is used to dynamically change element attributes based on screen size. | |
| * | |
| * ## 使用方法 / Usage | |
| * | |
| * 1. 在父元素上添加控制器 / Add controller to parent element: |
OlderNewer