Skip to content
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

Compatibility issue with pry-rails < 0.1.6. (was default_actions doesn't render anything) #983

Closed
kostia opened this issue Feb 6, 2012 · 13 comments
Milestone

Comments

@kostia
Copy link

kostia commented Feb 6, 2012

Hi there,

following code-snippet doesn't render any action buttons in action menu in the top right corner:

ActiveAdmin.register(Category) do
  menu(:priority => 1)

  filter(:title)
  filter(:name)
  filter(:created_at)
  filter(:updated_at)

  index do
    column(:title)
    column(:name)
    column(:created_at)
    column(:updated_at)

    default_actions
  end
#...

Same in the show page.

  • Rails-3.2.1
  • ActiveAdmin-0.4.0

Kind regards!
Kostia

@bbatsov
Copy link

bbatsov commented Feb 7, 2012

I was just about to report that issue myself. ActiveAdmin used to work fine before an update to Rails 3.2.1 and ActiveAdmin 0.4 - now the buttons produced by default_actions are gone everywhere.

@mattvague
Copy link
Contributor

Hey guys,

The naming might be a bit confusing, but default_actions doesn't actually control the action buttons in the top right corner it controls the "View | Edit | Delete" action links beside each table row. Removing it would remove those links.

Are you saying the buttons aren't showing up at all for you guys? Are you by any chance using config.clear_action_items!?

@kostia
Copy link
Author

kostia commented Feb 8, 2012

The naming might be a bit confusing

Sorry about confusion.
Both ("View | Edit | Delete" in the table rows and the buttons from action menu) doesn't appear anymore. Of course default_actions renders only the links on the index page. But it might be a hint, that also the "Edit | Delete" button in the top right corner on the show page doesn't appear anymore.

Are you by any chance using config.clear_action_items!?

No, I don't.

@mattvague
Copy link
Contributor

Hmm, there are a few reports of this now. What version of Ruby/Rails/ActiveAdmin are you using?

@kostia
Copy link
Author

kostia commented Feb 9, 2012

  • Rails-3.2.1
  • ActiveAdmin-0.4.0
  • Ruby-1.9.3-p0 (Rbenv on OSX)

Also: Formtastic-2.0.2

@mattvague
Copy link
Contributor

Duh, just noticed you said that above sorry haha. When did this start happening for you?

@kostia
Copy link
Author

kostia commented Feb 9, 2012

Before update:

  • Rails-3.1.3
  • ActiveAdmin-0.3.4

After update:

  • Rails-3.2.1
  • ActiveAdmin-0.4.0

Same Rubies. The reason for update was Rails-3.2 :-)

@bbatsov
Copy link

bbatsov commented Feb 9, 2012

My environment is exactly the same, the problem - as well. The column with the buttons generated by default_actions is missing in index views and so are Edit and Delete buttons in the show views.

@nbeloglazov
Copy link

I have the same problem. I also use pry-rails gem and it seems that it causes this weird behavior. If you use it, try to disable it and check if it works now. Or update to latest pry-rails - 0.1.6
Problem that pry-rails extends Object class with methods from module Rails::ConsoleMethods. One of the methods is controller methods, which return instance of ApplicationController. But controller method is used by active_admin so it gets wrong controller.
And this extending is enabled only in rails 3.2.x and higher.

@kostia
Copy link
Author

kostia commented Feb 13, 2012

Thanks a lot, Nikita! I can confirm, that it fixed the problem :-)

@bbatsov
Copy link

bbatsov commented Feb 13, 2012

@nbeloglazov Thanks a lot! I never imagined that pry-rails was involved at all. @kostia Maybe you should close the issue?

@ghost ghost assigned pcreux Feb 16, 2012
@pcreux
Copy link
Contributor

pcreux commented Feb 16, 2012

I will add pry-rails >= 0.1.6 to the dependency checker.

@pcreux
Copy link
Contributor

pcreux commented Feb 18, 2012

Closed by 8d604ec.

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

5 participants