gregbell/active_admin — Issue #715: ActiveAdmin.register 'model', :as => "something_else" incompletely implemented
Author: tlatim
Created: 2011-11-02 20:15:40+00:00
State: open

1) The create/update button still uses the model name

2) The BreadcrumbHelper::breadcrumb_links doesn't convert the parent 'something_else' to 'model' before looking up the record id.

I put this in my .../app/admin/active_admin/view_helpers.rb to deal with the first issue:

```ruby
module ActiveAdmin
class FormBuilder

def commit_button(*args)
options = args.extract_options!
options[:label] ||= (self.object.persisted? ? 'Update ' : 'Create ') + AAViewHelpers.humanize(self.object_name)
content = with_new_form_buffer{ super(*args,options) }
form_buffers.last << content.html_safe
end

end
end

class AAViewHelpers
class << self
include ActiveSupport::Inflector
include ActionView::Helpers::FormOptionsHelper
include ActionView::Helpers::FormTagHelper
include ActionView::Helpers::JavaScriptHelper
end
end