Marne, Thanks for the advice - I implemented an auto-incrementing number that the database assigns - much cleaner. My thought process was left over from a previous app I used to work with. I just needed some help thinking outside that box. I can auto-increment it and if the user doesn't like it they can change it if they want.
Thanks! Chris On Sep 2, 5:45 pm, Marnen Laibow-Koser <rails-mailing-l...@andreas- s.net> wrote: > internetchris wrote: > > Robert, that was a great explanation! I appreciate all of the other > > replies too. A couple more question to make sure I understand > > correctly... > > > So in all honesty this little button doesn't have much to do with the > > overall process, but it makes it easier for the user to see the last > > account number used so they can assign the next available account when > > submitting new records. > > The user should probably not be assigning account numbers. That's a job > for the DB. > > > New records will be infrequent so the idea > > that more than one user is posting them is probably unlikely but still > > possible. I can check for this prior to saving the record. > > Just avoid the problem entirely by letting the DB supply the number! > > > > > Robert, to make sure I understand what you are saying let me summarize > > my understanding... > > > The form submission "in it's entirety" is considered the "event" - the > > only way to provide the user with information like what I want to do > > is either when the page loads, via a refresh (Post) of some sort, or a > > tricky ajax event. It's not possible to call little events via buttons > > or forms when dealing with a web application unless I use ajax - is > > that correct? > > Not quite. You can have as many forms or links to controller actions as > you like on a given page. However, absent JavaScript, each form can > only have one submit action. > > > > > I really appreciate the help - this is something I have been grappling > > with in my brain. It's simply a hold over from how I learned to > > program - for better or worse. > > > Thanks! > > > Chris > > Best, > -- > Marnen Laibow-Koserhttp://www.marnen.org > [email protected] > -- > Posted viahttp://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

