![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
rails_admin_tag_list
Advanced tools
This plugin is no longer supported.
Greate rails_admin gem does not work with another great gem - acts_as_taggable_on, because rails_admin knows nothing about the virtual attributes *_list (tag_list, skill_list etc.), which created by acts_as_taggable_on for display and edit tags.
This problem is solved with rails_admin_tag_list gem.
In your Gemfile
:
gem 'rails_admin'
gem 'rails_admin_tag_list'
and run:
$ bundle install
Check acts_as_taggable_on docs in order to install it properly.
rails_admin_tag_list by default does the following:
TagList
for rails_admin*_list
- tag_list
, skill_list
etc.) and adds them to RailsAdmin.config
There is your model:
class Player < ActiveRecord::Base
acts_as_taggable
acts_as_taggable_on :skills
end
Note that tag_list (skill_list, etc.) attribute should be available for mass-assignment by rails_admin users.
Since Rails 3.2.3
config.active_record.whitelist_attributes
option is true by default; this means that you should put tag_list (skill_list, etc.) attribute in the white list, like in example above:
attr_accessible :tag_list, :skill_list
edit field view
In addition to default field view (named form_tag_list
) this gem provides two custom views tag_list_with_suggestions
and tag_list_with_autocomplete
. To enable any of them specify partial name:
RailsAdmin.config do |config|
config.model Player do
edit do
fields_of_type :tag_list do
partial 'tag_list_with_suggestions'
# the option sets max count of suggestions (default is 100); set -1 to abolish the limit
ratl_max_suggestions -1
end
end
end
end
You can do with tag_list fields whatever what allows to do rails_admin:
rename label
RailsAdmin.config do |config|
config.model Player do
edit do
field :tag_list do
label "Tags"
end
field :skill_list
end
end
end
hide all tag_list fields
RailsAdmin.config do |config|
config.model Player do
edit do
fields_of_type :tag_list do
hide
end
end
end
end
reassing partial
RailsAdmin.config do |config|
config.model Player do
edit do
fields_of_type :tag_list do
partial 'awesome_tag_list'
end
end
end
end
Create you custom partial and put it to app/views/rails_admin/main/
in your own project folder. Check an example
FAQs
Unknown package
We found that rails_admin_tag_list 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.