search for: blog_controller

Displaying 14 results from an estimated 14 matches for "blog_controller".

2007 Feb 09
3
Re: URL issues
...g/ > routes.rb to contain the following line: > > map.connect '''', :controller => ''blog'', :action =>''index'' > > I did that so when someone goes to mysite.com/bor/ they would get > directed to what is the index action in my blog_controller. > > Ok, so things are working and I can see my blog posts when I go to, > mysite.com/bor/ Now if I click on post I get redirected to > mysite.com/bor/blog/show/1 .....and from that page if I click "back" > I end up at mysite.com/bor/blog/list ....basically all the link...
2005 Dec 15
6
Code from famous RoR video?
Does anyone know where I could get text file with the code from the famous video where they create a Weblog in 15 minutes -- The one that''s here: href="http://rubyonrails.com/screencasts? (I can''t just watch it here at work, and I''d like to avoid having to re-type everything in any case.) Thanks! -- Posted via http://www.ruby-forum.com/.
2006 Jan 29
2
GetText and rjs templates?
hi, is it possible that gettext don''t work with rjs templates? i''ve just tried this simple example blog_controller.rb : class BlogController < ApplicationController def index end def dosomething end end index.rhtml : <html> <head> <%= javascript_include_tag :defaults %> </head> <body> <div id="test">Some text to change </div> <%= link_to_remote...
2006 Apr 03
8
Layout problem
...t! You might have expected an instance of Array. The error occured while evaluating nil.each What is the problem? I have used similar code to get the posts working but cant seem to get this to work. Am i missing something in the blog controller. At the moment i have the following code in the blog_controller: def categorylist @categories = Category.find(:all) end Can anyone help please! -- Posted via http://www.ruby-forum.com/.
2006 Jun 14
1
page caching with custom routes
hi , I''m having problems with expire_page with custom routes i''ll show some code blog_controller --------------- def clear_cache_rss_artikels expire_page url_for(:controller => "xml",:action => "rss_artikels") end this is called when a new article is posted or edited or destroyed xml_controller --------------- class XmlController < ApplicationController...
2007 Aug 19
3
fastcgi issue on production
I just deployed my rails app to my production server. It''s all working locally, but when I switched it over to the production server (at dreamhost) I get this error: # Logfile created on Sun Aug 19 15:22:48 -0700 2007 by logger.rb/ 1.5.2.9 [19/Aug/2007:15:22:48 :: 1841] starting [19/Aug/2007:15:22:48 :: 1841] Dispatcher failed to catch: You have a nil object when you didn''t
2006 Feb 14
1
Another HABTM Question
...have a question on what would be the best way to save a HABTM model. A posting habtm categories, and a category habtm postings. class Category < ActiveRecord::Base has_and_belongs_to_many :postings end class Posting < ActiveRecord::Base has_and_belongs_to_many :categories end In my blog_controller, where the actual posting is saved, is where I think I''m having some trouble. Here''s what I currently have to save a post: def create @posting = Posting.new(params[:posting]) body_content = @posting.body body_content.gsub!( /(.*)(\n)/, ''\1<br />'' ) @po...
2006 Jan 30
14
RoR admin system
I''m preety new at RoR (and programming), I tried a few tutorials, and really like the RoR simplicity, but my knowledge of the framework still isn''t very good (to be true, i understand the basics, but not everything that''s in the tutorials). But still I''d like to create a website which has: - front end interface (with no edit functions) - admin interface
2006 Apr 11
5
RJS adds comment but doesn''t update form
..._comment.rhtml <div id="divcomment"> <p><%= comment.name %> Says:</p> <p><%= comment.comment %></p> <p id="dateformat"><%= comment.created_at.to_s(:long) %></p> <hr/> </div> blog_controller def comment Post.find(params[:id]).comments.create(params[:comment]) render :update do |page| # show the new comment at the top of the comments display page.insert_html(:top, "comments", :partial => "comment") # quick and dirty way to empty the form that...
2006 Feb 27
4
(resend - sorry!) Which controllers?
Hello, I have recently started learning RoR. I think it''s _fantastic_. I am absolutely blown away. OK, this is to prepare you to my idiotic question. Hopefully, I won''t be stoned. I am designing a simple application, where users can register, and: * Publish a photo album * Publish a simple blog with comments * Determine their list of friends and foes The application will
2005 Dec 08
3
Different controllers placement
request: /blog controller placed at /app/controllers/test/blog_controller.rb: class Test::BlogController < ApplicationController def index render :text => ''Hello, World!'' end end What the write map.connect shoud I use? Any Idias? I see that map.connect ''/blog'', :controller => ''test/blog'' working co...
2006 Jul 09
2
Controller and action design patterns
I''m very new to rails and don''t want to get started in the wrong direction. My problem is that I don''t know how I should structure my controllers and actions. Is there a general rule for what is an action and what is a controller? For example should I start off by creating a controller for each page I have or do I create a controller for every table in the
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 ('' +
2010 Nov 16
15
acts_as_taggable, undefined method 'empty?'
...and stack trace: app/views/blog/index.haml:21:in `_run_haml_app47views47blog47index46haml'' haml (3.0.23) rails/./lib/haml/helpers/action_view_mods.rb:13:in `render'' haml (3.0.23) rails/./lib/haml/helpers/action_view_mods.rb:13:in `render'' app/controllers/blog_controller.rb:10:in `index'' haml (3.0.23) rails/./lib/sass/plugin/rack.rb:41:in `call'' /dh/passenger/lib/phusion_passenger/rack/request_handler.rb:92:in `process_request'' /dh/passenger/lib/phusion_passenger/abstract_request_handler.rb: 207:in `main_loop'' /dh...