search for: blogcontrol

Displaying 18 results from an estimated 18 matches for "blogcontrol".

Did you mean: biocontrol
2008 Apr 15
4
ActiveRecord::StatementInvalid in BlogController#index
...to build a blog engine in 15 minutes with ruby on rails" from the main rubyonrails website, and I''m getting an error when I try to use scaffold :post after editing my config file for the mysql database. Here is the exact error I''m getting: ActiveRecord::StatementInvalid in BlogController#index ActiveRecord::StatementInvalid RAILS_ROOT: ./script/../config/.. Application Trace | Framework Trace | Full Trace Request Parameters: None Show session dump Response Headers: {"cookie"=>[], "Cache-Control"=>"no-cache"} If anyone can help me I woul...
2008 Jan 30
1
undefined method `scaffold'
Hello, I have been busy for a while and now I am back to messing with rails. Last time I tried to use scaffold i worked now I am getting this error. Not really sure since I am using version 1.2.5 still NoMethodError in BlogController#index undefined method `scaffold'' for #<BlogController:0x506eb7c> Session dump flash: !map:ActionController::Flash::FlashHash {} Thanks for any help -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message beca...
2006 Mar 07
0
Webrick Timeout Problem
...ave the following in my socket: /tmp/mysql.sock, and this seems to be OK since it is able to generate errors when I enter a bad username or password. I checked the log/development.log file, and here are the last several lines that result from me hitting refresh on the blog page 3 times: Processing BlogController#index (for 127.0.0.1 at 2006-03-06 21:34:13) [GET] Parameters: {"action"=>"index", "controller"=>"blog"} Processing BlogController#index (for 127.0.0.1 at 2006-03-06 21:37:16) [GET] Parameters: {"action"=>"index", "co...
2006 Mar 13
1
issue with redirect_to
...sponse.redirect(params[:url]+'' target="_top"'') response.redirected_to = params[:url]+'' target="_top"'' but it didn''t work. Is this a know bug ? thanks in advance for your reply. regards Susanta Here is my sample code: controller: BlogController --------------------code----------------------------------- class BlogController < ApplicationController def index end def otherFrame render(:layout => false) end def show redirect_to(params[:url], {:TARGET => "_top"}) end end </BlogController.rb >...
2005 Dec 23
2
has_many and belongs_to relationship error
...;% for post in @posts %> 11: <div class="mission"> 12: <h3><%= h(post.posttitle) %></h3> 13: <%= post.posttext %> The code follows: class Post < ActiveRecord::Base belongs_to :user end class User < ActiveRecord::Base has_many :posts end class BlogController < ApplicationController def index @user = User.find_by_login(''bilal'') @posts = @user.posts @missions = Mission.find(:all) end end index.rhtml is <% for mission in @missions %> <div class="mission"> <h3><%= h(mission.missionname)...
2007 Aug 27
2
Can FILTERS AND VERIFICATION functions take arguments?
Hi, I have some problems in using filter. My filter functions need to have arguments, but filter functions take only symbol that refer to function name. Consider the following code: class BlogController < ApplicationController before_filter :authorize For instance, authorize need arguments. So how can I pass arguments to filter function? Any helps always appreciate. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google G...
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 ''click''...
2006 Apr 04
1
Calling a method in another controller
...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 -- Posted via http://ww...
2006 Apr 24
7
Controller can''t find helper?????!!!!!????
I have a controller named xyzController under app/controllers I have a helper class named xyzHelper under app/helpers. Shouldn''t I be able to call methods from xyzHelper inside of xyzController without any problems? Thanks, Wes -- Posted via http://www.ruby-forum.com/.
2007 Jul 03
4
problems with acts_as_ferret
Hi, I have i am trying to add a search feature to a ruby on rails blog, so ive decided to use ferret. So far i have had quite a few problems with it, from following a few tutorials i didnt really understand... i am at the point where i can make a search and it returns the score of the result. I want it to also show the title of the post and i think i have implemented it correctly but it
2006 Jul 31
5
can someone explain RoR MVC from a C++ or Java perspective?
is a model similiar to a class? and active record is similiar to how Java classes inherit from Object? View is nothing more than an output of a model with HTML? Controller is basically the Main part of the program? -- Posted via http://www.ruby-forum.com/.
2006 Aug 18
1
Fragment Caching
Hello. I wouldn''t mind getting some feedback about the use of fragment caching. I''ve got a series of relatively expensive database queries with their respective partials cached and everything is working fine. The problem is that do get this to work I''ve had to move the database queries from the controller into the view layer so as to avoid them being called if the
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
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 correctly, but what about more...
2007 Oct 23
3
Ruby on Rails and Oracle
...acle. I believe that it has something to do with database.yml, this is how my database.yml looks: development: adapter: oci database: 127.0.0.1:1521/XE username: system password: y1984nip0359 host: 127.0.0.1 And this is the Error that i get: -> http://127.0.0.1:3000/blog OCIError in BlogController#index ORA-12514: TNS:listener does not currently know of service requested in connect descriptor RAILS_ROOT: C:/ruby/bin/blog/script/../config/.. Application Trace | Framework Trace | Full Trace env.c:257:in oci8lib.so Any help? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~...
2006 Aug 31
1
Need architectural help avoiding render :component
...ermission to view that page. As far as I can tell, it''s not possible to handle this in routes.rb, so I put it in a controller, PageController. Once the app determines what kind of controller is required, it needs to pass on the request to the appropriate controller (a CalendarController, BlogController, ToDoController, etc). It seems like the most straightforward way of doing this is to have the last line of PageController''s routing function be "render :component => ..." I have managed to use what I consider to be a gigantic hack to get around this. PageController figu...
2006 Aug 08
12
Rails (internals) architectural question
Hi Another newbe here..... I was wondering if someone could please help me understand the controllers/view inner working in Production 1. If xxx_controller.rb is only loaded once does it mean there is only one instance of Controller serving all requests? 2. If only one instance of controller is there then how are controllers instance variables protected from data corruption when serving multiple
2008 Sep 02
14
SQL 3 Lite Error
Hello everyone, In my controller, I put the following code: render :text => "Hello World!" It popped up with this error: " MissingSourceFile in BlogController#index no such file to load -- sqlite3 RAILS_ROOT: C:/InstantRails/rails_apps/scblog Application Trace | Framework Trace | Full Trace c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'' c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in...