To conditionally display a field based on a value in the displayed object, you can do the following: RailsAdmin.config do |config| config.model YourObject do edit do field :some_random_attribute do visible do bindings[:object].your_conditional_field==”your_conditional_value” end end end end end In this Rails Admin configuration example, you can see that the YourObject#some_random_attribute field will only display if […]
Tag: display
Grep list only unique filenames
To list unique filenames using grep, do the following: grep -irl “search-term” . Notice the ‘l’ flag, short for –files-with-matches, defined as “Suppress normal output; instead print the name of each input file from which output would normally have been printed. The scanning will stop on the first match.” The i flag just makes […]