line 8
rename
def self.template_search_path_with_aal to def
template_search_path_with_aal
line
14-17:
#class <<
self
#
alias_method_chain :template_search_path, :aal
#end
alias_method_chain :template_search_path, :aal
For my porpouse I've also added a feature to order (ASC) every
singular association form
field
that reference an acts_as_list model (works only for simple
selects):
in active_scaffold_acts_as_list/init.rb
add:
load 'helpers/
association_helpers.rb'
create active_scaffold_acts_as_list/lib/helpers/association_helpers.rb
copying
from active_scaffold_acts_as_list/lib/helpers/association_helpers.rb
function
association_options_find to rename
association_options_find_with_aal
and
options_for_association
def association_options_find_with_aal(association, conditions =
nil)
if
association.klass.respond_to?'acts_as_list'
association.klass.find(:all
, :conditions => controller.send(:merge_conditions,
conditions,
association.options[:conditions]) , :order
=>
"#{association.klass.table_name}.#{association.klass.new.position_column}
ASC")
else ...
alias_method_chain :association_options_find, :aal
def
options_for_association_with_aal(association)
if
association.klass.respond_to?'acts_as_list'
available_records.collect { |model| [ model.to_label,
model.id ] }
else ...
On 5 Ott, 17:00, "Antonio Bardazzi Multicore-Sistemi.com"
<antonio.barda...@gmail.com> wrote:
> A modification to aa_acts_as_list to work in astrunkin
> active_scaffold_acts_as_list/lib/config/
> core.rb
>
> line 8
> rename
> def self.template_search_path_with_aal to def
> template_search_path_with_aal
> line
> 14-17:
> #class <<
> self
> #
> alias_method_chain :template_search_path, :aal
> #end
> alias_method_chain :template_search_path, :aal
>
> For my porpouse I've also added a feature to order (ASC) every
> singular association form
> field
> that reference anacts_as_listmodel (works only for simple