On Sábado, 19 de Marzo de 2011 23:06:14 mikelb escribió:
> Sergio,
> 
> I updated to the latest (https://github.com/activescaffold/
> active_scaffold.git -r 2.3).  I don't see any difference...  Am I
> missing something?

-r 2.3 is -r rails-2.3?

Look at frontends/default/views/_horizontal_subform_record.html.erb or 
frontends/default/views/_vertical_subform_record.html.erb, do you have next 
line?
action = @record.new_record? ? :create : (readonly ? :read : :update)

> 
> Thanks,
> M
> 
> On Feb 28, 10:22 am, "Sergio Cambra .:: entreCables S.L. ::."
> 
> <[email protected]> wrote:
> > On Sábado, 26 de Febrero de 2011 19:46:40mikelbescribió:
> > > 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
> > 
> > It should skip the columns, but it wasn't working in subform due to a
> > bug. I have fixed it now
> > 
> > > 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!
> > 
> > --
> > Sergio Cambra .:: entreCables S.L. ::.
> > Mariana Pineda 23, 50.018 Zaragoza
> > T) 902 021 404 F) 976 52 98 07 E) [email protected]

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 50.018 Zaragoza
T) 902 021 404 F) 976 52 98 07 E) [email protected]

-- 
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.

Reply via email to