8000 Can't display link without Strong tag · Issue #549 · activeadmin/activeadmin · GitHub
[go: up one dir, main page]

Skip to content

Can't display link without Strong tag #549

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pengpenglin opened this issue Sep 29, 2011 · 3 comments
Closed

Can't display link without Strong tag #549

pengpenglin opened this issue Sep 29, 2011 · 3 comments

Comments

@pengpenglin
Copy link

I have encounted a strange issue when render page in dashboard.

Below is the src code. It's so strange that active admin can't display link on section if I just put : link_to xxx, xxx_path without a tag around of it.

section xxxx do

table_for do
  column xxx
  column xxx

end

link_to xxx, xxx_path # it works if I use this strong {link_to xxx, xxx_path} instead
end

@samvincent
Copy link
Contributor

I use text_node link_to() rather than strong. Hope that helps.

@macfanatic
Copy link
Contributor

The link_to helper doesn't subclass from Abre::Component, so therefore it cannot be inserted into the document tree as a valid argument. @samvincent is correct, when in doubt, wrap your regular rails helpers or plain text in the low-level Abre calls, such as:

insert_text_node_if_string() or text_node

div { link_to "matt", app_dashboard() }

This is how I also render a partial in a show event:

ActiveAdmin.register Post do

    show :title => proc { resource.name } do
        panel "Information" do
            "Some info here"
        end
        insert_text_node_if_string( render :partial => "invoices" )
    end

end

@pengpenglin
Copy link
Author

Hi both, thanks a lot !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0