vhochstein / active_scaffold

Rails 4 Version of activescaffold supporting jquery
MIT License
156 stars 34 forks source link

As issue 77 #146

Open ghost opened 13 years ago

ghost commented 13 years ago

This is a merge of changes https://github.com/activescaffold/active_scaffold/commit/8d60d2bda5b67086aa7e9f2db4efc26a7995e3d8 (http://code.google.com/p/activescaffold/issues/detail?id=77) and https://github.com/activescaffold/active_scaffold/commit/9323d755ebd3ed0ea2b3cc79094b36879450efcb

without the depreciation warnings as requested in private discussion.

vhochstein commented 13 years ago

Hi,

just one quick question

  1. what about override_form_field_partial ?
ghost commented 13 years ago

Please be more specific. Is there any deficiency?

vhochstein commented 13 years ago

Well, old method style is nt possible anymore for override_form_field_partial? Maybe I am wrong... That s why I raised the question

ghost commented 13 years ago

Right, that's what activescaffold/active_scaffold did in the two commits. I can adjust it to enable the old-style if you want:

  def override_form_field_partial(column)
    path = active_scaffold_controller_for(column.active_record_class).controller_path
    partial_name = "#{clean_column_name(column.name)}_form_column"
    if template_exists?(partial_name, path, true)
      File.join(path, partial_name)
    else
      partial_name
    end
  end
vhochstein commented 13 years ago

Well, we agreed upon that both styles should be possible... So, yes I would say we need that change..