Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
locastyle_components
Advanced tools
Gem contendo helpers para construção de componentes do locastyle em templates ERB.
Add this line to your application's Gemfile:
gem 'locastyle_components'
And then execute:
$ bundle
Por ser uma versão inicial, essa gem contempla somente alguns componentes, podendo não atender alguns casos específicos.
Para usar os componentes de formulário é necessário que sejam chamados dentro de um bloco form do rails (form_for
):
<%= form_for(:user) do |f| %>
<%= f.gem_component_here(options) %>
<% end %>
Parâmetros:
# Usando nome do atributo como label
<%= f.locastyle_switch_button(:status) %>
# Usando uma label customizada
<%= f.locastyle_switch_button(:status, label: 'Custom') %>
# Sem label
<%= f.locastyle_switch_button(:default, label: false) %>
Esses componentes podem ser chamados em qualquer ponto da view.
Parâmetros:
Recebe um Hash como parâmetro e no momento utiliza somente a chave :title
. O conteúdo deve ser passado em um bloco.
<% content_for :collapse_header do %>
<h1 class="ls-collapse-title">Title</h1>
<p>Subtitle</p>
<% end %>
<%= locastyle_collapse_tag({ title: yield(:collapse_header) }) do %>
<p>Content</p>
<% end %>
<%= locastyle_collapse_tag({ title: some_helper }) do %>
<p>Content</p>
<% end %>
<%= locastyle_collapse_tag(some_helper) do %>
content_helper
<% end %>
<%= locastyle_collapse_tag(some_helper) do %>
<p>Content</p>
<% end %>
<%= locastyle_collapse_tag({ title: I18n.t('key') }) do %>
<p>Content</p>
<% end %>
Ao realizar alguma alteração, lembre-se de manter o que já tinha funcionando. Escreva casos de testes sempre que possível.
FAQs
Unknown package
We found that locastyle_components demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.