Pivotal Labs

Main menu

Skip to primary content
Skip to secondary content
  • About
  • Case Studies
  • Team
    • Executives
    • Locations
      • San Francisco (HQ)
      • Boston
      • Boulder
      • Denver
      • London
      • Los Angeles
      • New York
  • Community
    • Blogs
    • Tech Talks
    • Events
  • Careers
    • Lifestyle
    • Principles & Practices
    • Benefits
    • FAQ
    • Apply
  • Contact
    • Press Room
    • Press Releases
    • In The News
    • Press Kit
  • All
  • Labs
  • Standup
  • Tracker

[SF][Standup] 09/19/12: ActiveAdmin vs. RailsAdmin… Arrrggg!

Tyler Schultz
Wednesday, September 19, 2012

Interestings

  • ActiveAdmin after_save

If you are using ActiveAdmin, beware that the after_save callback gets fired both when the model gets saved, and when there are validation errors on the model.

It really behaves like a callback after the model save method gets called, regardless of its return value.

  • Testing RailsAdmin custom actions

Let’s say you’re writing a RailsAdmin custom action, and you want to test it with a request spec.

If the test passes when guard is on, but fails when guard is off, then you’ve forgotten that the RailsAdmin initializer does not run when loading a rake task. It does run as part of bundle exec guard start.

This is a performance ‘optimization’ that RailsAdmin adds.

To turn it back on, so you can test custom actions:

task :default => [:load_rails_admin_initializer]
task :load_rails_admin_initializer do
ENV['SKIP_RAILS_ADMIN_INITIALIZER'] = ‘false’
end

  • International Talk Like a Pirate Day!

Arrrgggggg me mateys! To your pairs you scabrous dogs!

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Add New Comment Cancel reply

Your email address will not be published.

Tyler Schultz

Tyler Schultz
San Francisco

Recent Posts

  • [Standup][SF] 09/21/12: Get older faster
  • Ah, ah, ah. Now, that was silly. Wouldn’t you agree, my bats? Ah, ah, ah.
  • [Standup][SF] 2012.05.25 – 1 git repo, 2 Procfiles, 2 Heroku Apps, CSS transitions behaving badly
Subscribe to Tyler's Feed

Author Topics

rails (5)
time (2)
css (1)
heroku (2)
javascript (1)
activerecord (1)
android (3)
robolectric (1)
tdd (1)
agile (7)
amazon (1)
default scope (1)
hudson (1)
rspec (1)
  • About
  • Case Studies
  • Team
  • Community
  • Careers
  • Contact
  • Labs
  • Events

Contact Us

contact@pivotallabs.com
+1 415-77-PIVOT
TwitterLinkedInFacebook

Pivotal Tracker

Tracker is the award-winning agile project management tool that enables real-time collaboration around a shared, prioritized backlog.
Visit pivotaltracker.com >