Hello,
I needed a couple of session variables to allow a reader of a blog to
be redirected to the correct URL if the blog name he's visiting
(app/:blogname) gets updated;
Question: is it convenient to pass 'base' to the model or would it be
more efficient to do everything in the controller?
ex. in blog.rb
def self.locate(base)
if !base.session[:last_visited_blog_id].nil? && base.params[:blog]
== base.session[:last_visited_blog_seo]
return Blog.find_by_id(base.session[:last_visited_blog_id])
end
end
thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---