I suppose that's possible, but seems a lot of work. For example, with the edit.vm I'd either have to design my own UI pretty much from scratch, or put ugly #if statements all through it to tell it to ignore the few properties I do not want to show up. Neither approach feels very appealing.
I could work out my own viewmodel implementation and pass THAT to the scaffolding, but converting to/from the activerecord entity to the viewmodel is also looks like a lot of manual work. It seems to me that putting some sort of attribute on the activerecord entity would be the simplest move. But that would mean my User model wouldn't have it's "Ignored" property on any scaffolding it might be used on in the future. Maybe adding to the scaffolding attribute itself would work-- some way to list the properties on the type that will be scaffolded. Or a callback method for the scaffolding code that would return the properties that should be used. Hmm. On Oct 31, 6:10 pm, John Simons <[email protected]> wrote: > Jake, > > You could override the default templates with your own for this > specific models. > Seehttp://www.castleproject.org/monorail/documentation/v20/integration/a... > for how to override templates. > And here for examples of > templates:http://github.com/castleproject/Castle.MonoRail/tree/master/src/Castl... > > Cheers > John > > On Nov 1, 2:03 am, JakeS <[email protected]> wrote: > > > > > > > > > I'm using scaffolding to quickly generate a UI around a couple of > > activerecord models. But those models have a lot of properties on > > them that I don't necessarily want to show in this UI. Is there some > > way to have my scaffolding ignore some properties of the model? A > > quick scan of the source doesn't seem to show one. > > > If not, I suppose I could just hack in a quick [ScaffoldIgnore] > > attribute, right? -- You received this message because you are subscribed to the Google Groups "Castle Project Users" 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/castle-project-users?hl=en.
