This file contains 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
AllCops: | |
TargetRubyVersion: '2.5' | |
Exclude: | |
- 'cache/**/*' | |
- 'bin/*' | |
- 'db/**/*' | |
- 'test/test_helper.rb' | |
- '*.gemspec' | |
Documentation: |
This file contains 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
require 'formular/elements' | |
class InputCollection < Input | |
set_default :include_hidden, true | |
html do |element| | |
concat element.collection.map { |item| | |
item.to_html(context: :default) | |
}.join('') | |
concat element.hidden_tag | |
end |
This file contains 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
// Variables | |
// Backgrounds | |
$ember-power-select-background-color: #ffffff !default; | |
$ember-power-select-disabled-background-color: #eeeeee !default; | |
$ember-power-select-multiple-selection-background-color: $gray-200 !default; | |
$ember-power-select-highlighted-background: $blue !default; | |
$ember-power-select-selected-background: $gray-200 !default; | |
// Texts |
This file contains 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
require 'image/persistence' | |
class Image | |
class Representer < Roar::Decorator | |
include Roar::JSON::JSONAPI.resource :images | |
# top-level link. | |
link :self, toplevel: true do | |
"//images" | |
end | |
attributes do |
This file contains 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 FieldForm < Reform::Form | |
property :key | |
collection :field_options, form: FieldOptionForm | |
validation do | |
configure do | |
option :form # include this line if you want access to your form in predicates | |
config.messages_file = 'config/error_messages.yml' # if you define any custom predicates you must provide a message for them | |
This file contains 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
#views/users/_form.html.erb | |
<%= simple_form_for @form do |f| %> | |
<%= f.error_notification %> | |
<%= f.input :name %> | |
<%= f.input :email %> | |
<h4> | |
<%= link_to_add_fields icon(:plus), |
This file contains 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
en: | |
errors: | |
rules: | |
title: | |
filled?: "can't be blank" | |
first_name: | |
filled?: "can't be blank" | |
last_name: | |
filled?: "can't be blank" | |
email: |