Open your terminal.
In the root directory run the command:
sudo nano /etc/bluetooth/main.conf
| // This is a replacement for the built-in Rails ujs confirmation method when using Bootstrap. | |
| // Trying to hook into the built-in stuff is a pain, and changes with every Rails (now Hotwire) | |
| // version. | |
| import { Controller } from "stimulus"; | |
| import { Modal } from "bootstrap"; | |
| export default class extends Controller { | |
| static values = { | |
| title: String, | |
| message: String, |
| <div class="form-group"> | |
| <%= form.label :type, "Type", class: "font-weight-bold" %> | |
| <%= form.select :type, ['TextQuestion', 'UrlQuestion'], { include_blank: true }, { class: "form-control", data: { action: "input->toggle#changed", target: "toggle.select" } } %> | |
| </div> | |
| <div class="form-group"> | |
| <%= form.label :name, "Name", class: "font-weight-bold" %> | |
| <%= form.text_field :name, class: "form-control" %> | |
| </div> | |
| <div class="form-group" data-target="toggle.element" data-values="UrlQuestion"> | |
| <%= form.label :url, "URL", class: "font-weight-bold" %> |
| ruby '2.7.1' | |
| gem 'rails', github: 'rails/rails' | |
| gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
| # Action Text | |
| gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
| gem 'okra', github: 'basecamp/okra' | |
| # Drivers |
In rails 5 you can use add_flash_types method. Just add it to ApplicationController and include the types you want:
# application_controller.rb
...
add_flash_types :success, :warning, :danger, :info
on your controller use the appropriate type instead of 'notice':
| # frozen_string_literal: true | |
| # Use this setup block to configure all options available in SimpleForm. | |
| SimpleForm.setup do |config| | |
| # Default class for buttons | |
| config.button_class = "button" | |
| # Define the default class of the input wrapper of the boolean input. | |
| config.boolean_label_class = "checkbox" |
| pt-BR: | |
| simple_form: | |
| "yes": 'Sim' | |
| "no": 'Não' | |
| required: | |
| text: 'obrigatório' | |
| mark: '*' | |
| # You can uncomment the line below if you need to overwrite the whole required html. | |
| # When using html, text and mark won't be used. | |
| # html: '<abbr title="required">*</abbr>' |
| --- | |
| pt-BR: | |
| activerecord: | |
| errors: | |
| messages: | |
| record_invalid: 'A validação falhou: %{errors}' | |
| restrict_dependent_destroy: | |
| has_one: Não é possível excluir o registro pois existe um %{record} dependente | |
| has_many: Não é possível excluir o registro pois existem %{record} dependentes | |
| date: |
SessionsHelper
store_location (usage)redirect_back_or (usage)