gregbell/active_admin — Issue #630: Asset path issue with Rails 3.1.1
Author: jcarlson
Created: 2011-10-16 23:50:42+00:00
State: open

Just starting this issue as a tracking point for compatibility issues when upgrading from Rails 3.1.0 to 3.1.1.

Asset paths in CSS assets utilizing `ActiveAdmin::Sass::Helpers#active_admin_image_path` do not resolve correctly in Rails 3.1.1.

For example, in Rails 3.1.0, the generated css in active_admin.css returns:

```css
/* line 248, /Library/Ruby/Gems/1.8/gems/activeadmin-0.3.0/app/assets/stylesheets/active_admin/_forms.css.scss */
form.filter_form .filter_form_field.filter_date_range input[type=text] {
background: white url("/assets/active_admin/datepicker/datepicker-input-icon.png") no-repeat 100% 7px;
padding-right: 27px;
width: 71px;
}
```

Meanwhile, Rails 3.1.1 generates the following:

```css

/* line 248, /Library/Ruby/Gems/1.8/gems/activeadmin-0.3.0/app/assets/stylesheets/active_admin/_forms.css.scss */
form.filter_form .filter_form_field.filter_date_range input[type=text] {
background: white url("/images/active_admin/datepicker/datepicker-input-icon.png") no-repeat 100% 7px;
padding-right: 27px;
width: 71px;
}
```

Notice that the image path begins with `/images` and not `/assets` as it should.

I'm happy to help forward this issue to the Rails issue tracker if I can pin down exactly what the problem is, but so far, I haven't traced the issue to a root cause...

As an aside, I was able to replicate this with ActiveAdmin v0.3.0 and v0.3.2.