Hey all! I have a model where there are certain columns that I don't want to allow editing on but I want to allow create. So when it comes to the subform, I've figured out how to disallow the edit AFTER the form is posting by using the model method
def <column>_authorized_for_update?; false; end However... the field is still editable on the subform, which is very confusing for the client. When there is a text box, the assumption is that changing the value will change the value ultimately, but when the form is submitted, the value doesn't change. So.... what I want is to make that field read only on the subform... but for EDIT only. I still want the CREATE on the subform to show and be functional. I tried putting in the sub-model's controller: config.update.columns = [:the_only_column_I_want_updated] but then the BOTH the other update AND other create columns disappear. I even tried this: config.update.columns = [:the_only_column_I_want_updated] config.create.columns = [:the_only_column_I_want_updated, :one_column_I_want_created, :another_one, :etc] Even with that configuration, the subform still only shows :the_only_column_I_want_updated for the create column when I want the other columns for it as well. Thoughts? Many thanks! -- 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.
