Ruby on Rails
Saturday, March 3, 2018
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
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.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment