A few quick newbie questions

P

Peter Ehrlich

Hi

A few things I'm wondering - if anyone can answer without too much
trouble! (I know if I google enough I could learn what's going on..)

I'm trying to make a string of url parameters, like this:
"&#{unless category_name.nil?; 'category=' + category_name; end}"
and like that for about three different variables. Is there a faster
way?

Is there anything detrimental to using lots of partials or nested
partials? Does each one mean the sever has to open another file every
time its not cached - and so slow things down?

I have a partial which makes some ajax tabs. This (for reasons
currently beyond me!) means that the authenticity token changes, giving
the ActionController::InvalidAuthenticityToken error. One suggested fix
is to only protect put/delete/update, but that seems undesirable. Do I
want to be useing with => authenticity_token here? how?

Thanks in advance!!
--Peter
 
A

Aaron Patterson

Hi

A few things I'm wondering - if anyone can answer without too much
trouble! (I know if I google enough I could learn what's going on..)

I'm trying to make a string of url parameters, like this:
"&#{unless category_name.nil?; 'category=' + category_name; end}"
and like that for about three different variables. Is there a faster
way?

Maybe this:

"&#{category_name && 'category=' + category_name}"
Is there anything detrimental to using lots of partials or nested
partials? Does each one mean the sever has to open another file every
time its not cached - and so slow things down?

I have a partial which makes some ajax tabs. This (for reasons
currently beyond me!) means that the authenticity token changes, giving
the ActionController::InvalidAuthenticityToken error. One suggested fix
is to only protect put/delete/update, but that seems undesirable. Do I
want to be useing with => authenticity_token here? how?

These are rails specific questions. You should try the ruby on rails
mailing list:

http://lists.rubyonrails.org/mailman/listinfo/rails
 
P

Peter Ehrlich

Ah yes, I noticed this right after posting, and wasn't sure what the
correct action was - reposted.

And I'll try the code you suggested - thanks!
--Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,981
Messages
2,570,188
Members
46,731
Latest member
MarcyGipso

Latest Threads

Top