search for: blog_content

Displaying 3 results from an estimated 3 matches for "blog_content".

Did you mean: log_content
2005 Oct 28
1
Actionless self-referential views , logic in my views, yes, but less LOC. One draw back, it dont work.
<%= render (:partial => "collapsed_blog" , :locals => {:be => be , :hide => "yes"}) %> This above code is in a .rhtml page. Here is the partial it renders: <p class=<%="blog_content" + be.id.to_s%>> <% if hide == "yes" %> <%= be.blogshorttext %> <%= link_to_remote ('' [See Full Text ('' + be.wordcount + '')]'', :update=> ("blog_content" + be.id.to_s), :url=> {:partial => ''colla...
2008 Jan 13
6
Graceful way to handle execution expired and bad URI errors?
...page_object.blog_feed else @blog_url = @page_object.blog_feed end end [/code] and here'' s the view code: [code cache({:controller => "rss", :action => "feed_widget_details", :id => @page_object.id}, {:expires => 15.minutes}) do begin blog_contents = Net::HTTP.get(URI.parse( @blog_url + ''&='' + params[:k] )) rescue blog_contents = ''<title type="text">No blog entries</title>'' blog_contents end -%> <%=blog_contents-%> <% end -%> [/code] I just added the...
2006 Apr 04
1
Calling a method in another controller
...l get the top 5 most discussed articles, and display it on the homepage. I will also have some specific homepage modules being displayed on the page. I am trying to do something like this : require ''content'' class HomepageController < ApplicationController def list @blog_contents = BlogController.list @article_most_discussed = ArticleController.list etc... end end But it does not seem to work. How do I reference methods in other controllers ? Is it done ? I can replicate the code in this controller, but that will be messy. Thanks in advance. Hamza -- Poste...