hmm, plugin moves scaffold_columns to controller ... is this a good thing?

0 views
Skip to first unread message

rovnak

unread,
Apr 1, 2007, 6:46:38 AM4/1/07
to Ruby On Rails: Ajax Scaffold

I was using the scaffold_columns extensively in customized AS
generator models.

Now, that I'm trying to move to AS plugin I'm wondering if the
location change for scaffold_columns is a good thing.

>From a reuse perspective, if the same model is going to appear in
multiple contexts, from multiple controllers, (think included list
views here )
wouldn't it be better to have the scaffold_columns stay with the
model? Otherwise, it seems we have to replicate the scaffold_columns
definition in > 1 controller?

rovnak

unread,
Apr 1, 2007, 6:53:16 AM4/1/07
to Ruby On Rails: Ajax Scaffold

I withdraw the comment and concern.

I was forgetting that the nested/embedded render tags refers to the
controller, so putting the scaffold with controller seems fine for
reuse.

My apologies.

<p/>
<%= render_component :controller => '/view_todos', :action =>
'component', :params => {:user_userid => @user.userid} %>
<p/>
<p/>
<%= render_component :controller => '/view_watches', :action =>
'component', :params => {:user_userid => @user.userid} %>
<p/>

Reply all
Reply to author
Forward
0 new messages