Using params[] in view or setting the value in controller?

If i pass a param like params[:bid], should I do something like @bid =
params[:bid] and then use @bid in the code. Or should I just use
params[:bid] in the actual view?

Aryk Grosz wrote:

If i pass a param like params[:bid], should I do something like @bid =
params[:bid] and then use @bid in the code. Or should I just use
params[:bid] in the actual view?

Using params[:bid] directly is fine, mostly. as long you feel
comfortable with using whatever is in the url, not modified at all.

Often though, you want to validate or alter that data. In those cases
it’s better to assign it to an instance variable so you can be sure it’s
the data after alteration and validation, rather than what ever is in
the url.

Hi Alex,

Thanks for the response. The only thing that annoys me is that if i have
params[:all], i have to put that in everwhere cuz its kinda long a
repetitive, whereas setting @all=params[:all], i could just use @all.

Im wondering what other people do on this?