Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6722717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:28:49+00:00 2026-05-26T09:28:49+00:00

I’m putting up the same question I asked here in activeadmin’s issues board on

  • 0

I’m putting up the same question I asked here in activeadmin’s issues board on github:
https://github.com/gregbell/active_admin/issues/645

Hi,

I have two different issues.

1: i love the way active admin handles has_many relationships with a simple DSL like so:

 ActiveAdmin.register Artist do
   form do |f| 
     f.inputs do
       f.input :name
       f.input :description 
     end
     f.inputs "ArtistLinks" do
       f.has_many :artist_links do |j| 
         j.inputs :title, :url
       end 
     end 

     f.buttons
   end 
 end

The ability to add more links at the bottom of the form is great.

However,I have been using a wyiswyg which i can’t seem to get working in this format. I’ve been using/adding it with a partial like so:

  ActiveAdmin.register NewsItem do
    form :partial => "/news_items/form"
  end

/app/views/news_item/_form.html.erb

 <%= javascript_include_tag "/javascripts/ckeditor/ckeditor.js" %>
 <%= semantic_form_for [:admin, @news_item], :multipart => true do |f| %>
 <%= f.inputs :title, :photo, :excerpt %>
 <%= cktext_area_tag("news_item[content]", @news_item.content) %>
 <%= f.submit %>
 <% end %>

However,
in my partial, i can’t seem to be able to make the has_many relationship nicely like so:

 f.inputs "ArtistLinks" do
   f.has_many :artist_links do |j| 
     j.inputs :title, :url
   end 
 end

Could you either explain to me how to get my wysiwyg which uses a form helper cktext_area_tag into my admin resource or explain to me how to get that nice has_many into my view partial?

Thanks a bunch!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T09:28:50+00:00Added an answer on May 26, 2026 at 9:28 am

    The reason why has_many does not work in partials is because Active Admin tells you to use semantic_form_for when writing your partial. Active Admin extends Formtastic which it uses to generate forms. It does so by creating its own form builder that extends the Formtastic builder and adds, among others, the has_many method. So if you want to use that inside partials you have to use the Active Admin form builder. To do that use active_admin_form_for instead of semantic_form_for.

    If you have problems using active_admin_form_for, take a look at my branch which should fix most of the issues (it’s still beta – but I’m working on getting it into Active Admin core)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.