I'd have to agree with Ar Chron, it sounds like you need the PickAxe book from the PragProg publishers, along with AWDwR - both of which should be required reading for noobs. Personally, I went on a turbo learnig curve and went on after those two books with Metaprogramming Ruby, again from Dave & Andy @ PragProg, and haven't looked back.
It does depend on your knowledge level though. Don't try and run before you can walk. If you are from a OO background then get stuck in and make sure you checkout Meta...Ruby. If you are new to OO, then take your time with the PickAxe book and AWDwR, once you 'think' you understand those, then maybe move on to Meta...Ruby => you can always step back if you need to..... As a reult of Meta...Ruby, I have just refactored 100's of lines of biolerplate crap (due to the point I was at in my learning curve with my initial learning project) to a few Ruby modules containing no more than 50 lines of code each - Ruby is a great language (thanks Matz :)) and it is well worth learning its basics first in order to move on after that..........take some time learning to Jog on the spot, after a while you will find yourself sprinting the 100m's in under 8 secs........... You seem to have your RoR terms mixed up a bit. Forget about the 'scaffold' as such. That is what the generator creates at your command in order to provide you with a starting point for your application - none of it is written in stone - all of it can be tweaked, changed, re- written. Don't forget, you can generate models, migrations, etc. All that the generator is, is Ruby code that creates files based on the Rails Framework to save you the job of creating those files manually. The generator created scaffold includes, most imprortantly (in my eyes); your controllers, your models and your migrations. Also created are your Views and test beds. Personally, I don't care about the Views, because I use Flex for the front end which connects to RoR via Flash's RemoteObject and RubyAMF. I hold my hand up to say I need to look more into the test files (fixtures, unit, helpers, etc) myself. Haven't found the need for those yet due to creating EXE's that test my DB and server functionality - they may save me some work as per most of the RoR framework - just need to find the ROI for the learning curve... Your 'Submit' action has nothing to do with your scaffold, other than, presumably, your submit button in your generated scaffold View. Your original question sounds like the following: User accesses and fills in the form User submits the form Administrator (of sorts) receives notification the form has been submitted Administrator accepts or dismisses the submitted form If so, then all you need to do, is to set up your DB to accept new submissions. You can then decide how you want your Administrator to be notified : this would depend on Application/Business/Project specific directives - Admin logs in and downloads latest submissions written to the DB, latest submissions get written to a log file that the Admin can access, Admin gets e-mail confirming latest submission etc. Is this correct? Regards Paul On Apr 7, 4:36 am, Ryan Waldron <[email protected]> wrote: > David, I don't know if this would help you, but you might poke around > inhttp://github.com/subwindow/needs_approvalfor some ideas. I've > not used it, so I don't know how mature it is. > > On Tue, Apr 6, 2010 at 5:08 PM, David Zhu <[email protected]> wrote: > > Hey, > > > I'm not sure how complex this really is, but i hope it isn't too > > difficult for you guys to explain here > > > My question is, is there a way to intercept a Submit action (for a > > scaffold, etc) of a form, and take that submit action and present it > > to an ADMIN user, where he/she can either finish submitting the form, > > or ignore the request? > > > Kind of a like a confirmation system.. > > > Hopefully you guys can help me out, I'm not that good at ruby on > > rails, but hopefully ill get better :) > > > Thanks for your help! > > > -- > > 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 > > athttp://groups.google.com/group/rubyonrails-talk?hl=en. -- 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.

