# In lieu of scaffolding

**URL:** <https://www.ruby-forum.com/t/in-lieu-of-scaffolding/167091>\
**Category:** Rails\
**Created:** [May 3, 2009, 7:30pm UTC](https://www.ruby-forum.com/t/in-lieu-of-scaffolding/167091 "2009-05-03T19:30:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![JannaB](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/df788c/32.png) [@JannaB](https://www.ruby-forum.com/u/JannaB)\
**Post date:** [May 3, 2009, 7:30pm UTC](https://www.ruby-forum.com/t/in-lieu-of-scaffolding/167091/1 "2009-05-03T19:30:22Z")

</div>

I am wondering what you gentlemen might use in lieu of basic  
scaffolding. Suppose I have a simple table, and it has, say, 100,000  
rows. I want the user to be able to drill down to edit (and/or  
possibly delete) a given row, as well as to show him, say, a screen  
(or more) of potential candidate rowns that meet his criteria. Surely,  
there must be some widely used public domain code to do this?

As an example, suppose I have a table of “people” and one of the  
fields is lastname. As I type in letters for the lastrname, the  
candidate rows that match that partial lastname begin to show, such  
that the user can select a single row to edit/delete. Is there some  
basic public domain code out for doing something along these lines?

What do you gentlement use when you want scaffolding that is more than  
just the basic scaffolding for table editing like this? Thank you! -  
JannaB

---

<div class="post-metadata">

**Author:** ![JannaB](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/df788c/32.png) [@JannaB](https://www.ruby-forum.com/u/JannaB)\
**Post date:** [May 3, 2009, 8:02pm UTC](https://www.ruby-forum.com/t/in-lieu-of-scaffolding/167091/2 "2009-05-03T20:02:35Z")

</div>

On May 3, 10:28 am, JannaB [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> that the user can select a single row to edit/delete. Is there some  
> basic public domain code out for doing something along these lines?
> 
> What do you gentlement use when you want scaffolding that is more than  
> just the basic scaffolding for table editing like this? Thank you! -  
> JannaB

I don’t know about “public domain,” but you’d probably want to look  
into observers and in\_place\_edit. Besides that, it all sounds basic  
enough.

-eric

---

<div class="post-metadata">

**Author:** ![JannaB](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/df788c/32.png) [@JannaB](https://www.ruby-forum.com/u/JannaB)\
**Post date:** [May 4, 2009, 6:36pm UTC](https://www.ruby-forum.com/t/in-lieu-of-scaffolding/167091/3 "2009-05-04T18:36:20Z")

</div>

JannaB wrote:

> I am wondering what you gentlemen might use in lieu of basic  
> scaffolding.  
> […]

Check out ActiveScaffold

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![JannaB](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/df788c/32.png) [@JannaB](https://www.ruby-forum.com/u/JannaB)\
**Post date:** [May 5, 2009, 4:11pm UTC](https://www.ruby-forum.com/t/in-lieu-of-scaffolding/167091/4 "2009-05-05T16:11:54Z")

</div>

ActiveScaffold brings with it a lot of magic. If you do everything  
and name everything the way it wants, all is good. Otherwise, If you  
have model names or table names that don’t follow the way it works,  
you will have to change your code or be in for a lot of hurt.

By the time you are up to 100k rows, you may well want to create your  
own helpers and use prototype or jQuery code to make the table behave  
exactly the way you want.

Brendon.

On May 4, 9:36 am, Marnen Laibow-Koser \<rails-mailing-l…@andreas-

---

<div class="post-metadata">

**Author:** ![JannaB](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/df788c/32.png) [@JannaB](https://www.ruby-forum.com/u/JannaB)\
**Post date:** [May 5, 2009, 5:27pm UTC](https://www.ruby-forum.com/t/in-lieu-of-scaffolding/167091/5 "2009-05-05T17:27:27Z")

</div>

Brendon Whateley wrote:

> ActiveScaffold brings with it a lot of magic. If you do everything  
> and name everything the way it wants, all is good.

It does want helper methods named a certain way, but so what?

> Otherwise, If you  
> have model names or table names that don’t follow the way it works,  
> you will have to change your code or be in for a lot of hurt.

Um…no. Not as far as I can tell. Granted, I haven’t used  
ActiveScaffold that much, but I don’t recall any restrictions – beyond  
those imposed by Rails – on what your models or tables may be called.

> By the time you are up to 100k rows, you may well want to create your  
> own helpers and use prototype or jQuery code to make the table behave  
> exactly the way you want.

What does the number of rows have to do with it? AS isn’t perfect for  
everything, but it does support exactly what you’re describing AFAIK.  
And since the OP was asking about substitutes for Rails’ scaffolding, it  
seemed like the best thing to suggest. Do you know of something better?

> Brendon.

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![JannaB](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/df788c/32.png) [@JannaB](https://www.ruby-forum.com/u/JannaB)\
**Post date:** [May 6, 2009, 7:31am UTC](https://www.ruby-forum.com/t/in-lieu-of-scaffolding/167091/6 "2009-05-06T07:31:16Z")

</div>

On May 5, 8:27 am, Marnen Laibow-Koser \<rails-mailing-l…@andreas-  
[s.net](http://s.net)\> wrote:

> Brendon Whateley wrote:
> 
> > ActiveScaffold brings with it a lot of magic. If you do everything  
> > and name everything the way it wants, all is good.
> 
> It does want helper methods named a certain way, but so what?

You may have to create controllers for models that don’t have  
controllers which is messy, but not fatal.

> > Otherwise, If you  
> > have model names or table names that don’t follow the way it works,  
> > you will have to change your code or be in for a lot of hurt.
> 
> Um…no. Not as far as I can tell. Granted, I haven’t used  
> ActiveScaffold that much, but I don’t recall any restrictions – beyond  
> those imposed by Rails – on what your models or tables may be called.

ActiveScaffold is very simplistic in its conversion of model to table  
names. If you have a plural where it doesn’t expect it, it can’t find  
the stuff. The reason you don’t recall the restrictions is that they  
are not documented, you have to run into them to figure them out. If  
you are starting fresh, it may not be a problem. Rails restrictions  
are few, conventions are many. The latter get broken sometimes in  
real life and Rails has little problem with that, although you are  
biting off some extra work. AS does not let you override many of its  
conventions.

> > By the time you are up to 100k rows, you may well want to create your  
> > own helpers and use prototype or jQuery code to make the table behave  
> > exactly the way you want.
> 
> What does the number of rows have to do with it? AS isn’t perfect for  
> everything, but it does support exactly what you’re describing AFAIK.  
> And since the OP was asking about substitutes for Rails’ scaffolding, it  
> seemed like the best thing to suggest. Do you know of something better?

Simply that by the time you have an application with that much data,  
you probably have some ideas of what you want and may well find that  
AS is harder to customize than just rolling your own. If that isn’t  
the case, then it will be a big help. I’ve just found 100% of  
projects that have been in production for more than a few months are  
difficult to retrofit with active scaffold.
