In lieu of scaffolding

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

On May 3, 10:28 am, JannaB [email protected] 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

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
[email protected]

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-

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
[email protected]

On May 5, 8:27 am, Marnen Laibow-Koser <rails-mailing-l…@andreas-
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.