On Apr 29, 9:04 pm, dlittle <[email protected]> wrote:
>
> The main system in question is a visitor check-in system where a host
> (the person they're visiting) has an admin enter visitor info. Once
> entered, it shows up at the guard station where they're checked in and
> then proceed to pick up a visitor badge.
>
> Questions:
>
> 1. The guard station system is very simple. It shows a list of the
> expected visitors and beside each is a check box. The guard checks
> off all the visitors arriving in a vehicle (sometimes one, sometimes a
> busload) and presses submit. All the examples I've seen process a
> single record and that doesn't work in this case.
Single records are the simple case but that doesn't mean those are the
only cases.
For example if for each visitor you have a checkbox and the input name
is foo[] and the value is the id of the visitor then when you submit
the form params[:foo] will be an array with the values of the checked
checkbox
>
> 2. For some views or for actions to be completed, I want certain
> fields to be required but in others, I do not want them to be
> required. At least at first glance, the controller seems to enforce
> this for all views. As an example, lets say I want users to come in
> and start an order with the ability to save it as a draft with no
> checking but before they can submit it, it has to have all the
> required stuff entered.
>
you may be interested in the if/unless options for validations -
they're quite flexible.
> 3. Everything I've seen so far relates to pulling data from a single
> web page on submit. In most of my databases, I'm pulling in LOTS of
> data (6 pages minimum) and then going to the next page. How are
> people handling intermediate page saves? Cookies is an option but I'd
> rather have it in the database since the user may move from one
> computer to another.
>
having the session just contained the id of an 'in progress' database
record is an option (or depending on how your app works it might be
more appropriate for that to be a column on the users table.
> 4. In some views, I want a login to be required and in other cases, I
> don't. For example, I want to allow anonymous entries but I want an
> admin to have to view them before they're officially posted. I
> haven't quite gotten to the point in any book that covers
> authentication so this may be trivial.
Without going into specifics this doesn't sound very hard very hard.
> 6. I haven't yet seen any way to encrypt data before it gets saved to
> the database and we collect some data that would be considered
> sensitive. What I do now i(not in Rails) s use a second pub/priv
> keypair to encrypt the data when it first comes in and then save that
> to a blob.
>
A before save callback on the model class that encrypts the data would
probably do the trick.
Fred
> If you're interested in building the demo, email me off-list and I'll
> send you more info.
>
> Thanks,
>
> Dennis
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" 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/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---