get request params using proc

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

get request params using proc

fugee ohu
I need to redirect using a specificied layout if params for create meet a certain condition, if imageable_type=='Blogit::Post' The line of code below is wrong shows what I'm trying to do, just needs correcting
        layout proc { |controller| controller.request.imageable_type==Blogit::Post ?  '/blogit/application' : '/application' }

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/5ba7c2f4-a5c2-49cf-bfc6-b9a28c1c6296%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.