Forms - a better way to pass data?

i know there is a better way to do this…

i am running a logging type program using rails…

a macromedia director program sends some post data to:


and if the data is okay, it makes a new entry into the database…

the problem is:

when i first wrote it, i had a form that i used to make sure all the
data was moving around okay…

what i did was, named all the form elements as “entry[name]”…

this passed a hash to the controlller… and i did something like:[:entry])

and everything worked great…

we just found out that director has a problem passing such data to the
controller, and i had to remove all of the hash entries, and just called

realm, user, status, message…

when i did something like:

i had a problem with the number of arguments…

the snipped of code at the bottom of this shows how i handled this…

it works and all, but i want to come up with a better way to do this
when i have a HUGE form that may run into this problem…

so, is there a more elegant way to do this?

thanks so much!

—code snippet—

class LoggerController < ApplicationController
def index
if and @params[:usage]==“logger”
@[email protected]
@entry =>params[:user],:realm=>params[:realm],:status=>params[:status],:message=>params[:message])
@message=“illegal access… data not logged…”

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs