Is it possible in active admin to list all the associations of has_manymy record as links?
has_many
The code should look something like this:
column "belongs to" do |b| b.associations.map { |a| link_to(a.name, admin_association_path(a) } end
But this generates a list of tags that do not appear as links available for the link.
mapcreates an array of html lines, so you need jointo get them one line, and then mark it as html-safe.
map
join
column "belongs to" do |b| b.associations .map { |a| link_to(a.name, admin_association_path(a)) } .join .html_safe end
Source: https://habr.com/ru/post/1607721/More articles:PHP: how to split a line on a dash and everything between brackets. (preg_split or preg_match) - phpUsing an approximate function for grouped data in R - rВ Vim существует ли способ перемещать объект/движение (слово, символ, визуальный выбор и т.д.) Горизонтально в строке, перемещая символы вокруг него? - vimLex - double quotation mark inside a string - stringUsing zoo rollsum in a data table. For derivatives transactions - rdplyr + adding a replicated vector via 'mutate' - rLinear interpolation using dplyr - rSwift2.0: How to get both return value and error using try catch - iosFailed to install json - Ubuntu 14.04 - Rails - jsonHow to scroll a div when ajax is used to load data in selenium python - javascriptAll Articles