class ApplicationController < ActionController::Base
ActiveScaffold.set_defaults do |config|
config.columns.exclude :created_at, :updated_at, :audits
end
end
On Wed, May 27, 2009 at 6:48 AM, <[email protected]> wrote:
> You can exclude these columns everywhere. Look at the wiki for core
> overrides
> Sent from my Verizon Wireless BlackBerry
>
> -----Original Message-----
> From: suranyami <[email protected]>
>
> Date: Tue, 26 May 2009 23:29:30
> To: ActiveScaffold : Ruby on Rails plugin<[email protected]>
> Subject: acts_as_audited with ActiveScaffold
>
>
>
> Just thought I'd share an insight we had into using acts_as_audited
> with ActiveScaffold.
>
> We were getting 500 errors whenever we created or edited an audited
> object, because AS was trying to use a partial subform for the
> "audits" column which had been dynamically associated by
> acts_as_audited. When it couldn't find it, it choked.
>
> Our workaround was to simply exclude the audits column from any of the
> models that were being audited.
>
> active_scaffold :organisation do |config|
> config.list.columns = [:name, :code, :state, :country, :logo]
> config.columns.exclude :created_at, :updated_at, :audits
> end
>
> Hope this helps someone that needs to do this too...
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---