Displaying 20 results from an estimated 27 matches for "test_controller".
2005 Dec 31
7
Application Errors w/ layout & custom view pages
1) I get Rails Application Error when trying to use layout
test_controller
def list
layout "stdlayout"
end
in the views/test/layouts stdlayout.rhtml
<html>
<head><title>test</title></head>
</body>
<h1>Test</h1>
<%= content_for_layout %>
</body>
</html>
2) I get Rails Application Error when tr...
2006 Jul 14
1
no such file found
...on Linux SUSE, apache2 using fastcgi. Now
at http://host/ I''m able to see the greeting page (index.html in
public). However, if I try to access my app http://host/candidate/index
I keep getting in the log:
No such file to load --
/usr/home/nye/hire/public/../config/../app/controller/test_controller.rb
Did I set my path wrong? What''s this
/usr/home/nye/hire/public/../config/../app/controllers/test_controller.r
b
My test_controller.rb sits in /usr/home/nye/hire/app/controllers but why
is it looking in
/usr/home/nye/hire/public/../config/../app/controller/test_controller.rb...
2006 Jul 14
0
no such file to load?
...on Linux SUSE, apache2 using fastcgi. Now
at http://host/ I''m able to see the greeting page (index.html in
public). However, if I try to access my app http://host/candidate/index
I keep getting in the log:
No such file to load --
/usr/home/nye/hire/public/../config/../app/controller/test_controller.rb
...
Did I set my path wrong? What''s this
/usr/home/nye/hire/public/../config/../app/controllers/test_controller.r
b
My test_controller.rb sits in /usr/home/nye/hire/app/controllers but why
is it looking in
/usr/home/nye/hire/public/../config/../app/controller/test_controller.r...
2006 Jul 22
3
Connection refused - connect(2)
...d: cdlibrary
If I call this action "VIEW" from test controller, I am getting the
following error message in screen,
Errno::ECONNREFUSED in TestController#view
Connection refused - connect(2)
#{RAILS_ROOT}/app/models/cd_details.rb:7:in `find_data''
#{RAILS_ROOT}/app/controllers/test_controller.rb:4:in `view''
How to solve this problem.
--
with regds,
Nahalingam N. Kanakavel.
(http://www.nahalingam.bravehost.com/PlanetN/)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060722/a9048e72/att...
2006 Apr 27
15
Which is faster, calling helpers or rendering a partial?
Using partials is a nice way to separate chunks of content into
separate pages as opposed to building strings in helpers, but I''m
wondering which is faster. It scares me when I see stuff like:
Rendered users/_public (0.00051)
Rendered users/_public (0.00009)
Rendered users/_public (0.00008)
Rendered users/_public (0.00008)
Rendered users/_public (0.00008)
....50 more times
Has anyone
2006 May 13
1
newbie question - routes.rb on server
...connect '''', :controller => ''test'', :action => ''index''
map.connect '''', :controller => ''Test'', :action => ''index''
map.connect '''', :controller => ''test_controller'', :action => ''index''
map.connect ''test/:controller'',:action => ''index''
map.connect "test", :controller => "Test"
map.connect "test/:controller/:action/:id"
At both http://127.0.0.1:3000/ a...
2006 Jul 16
6
Apache2.2 + Mongrel: what do you think about these perfs?
Hi all,
I''ve been spending quite a lot of time trying to install a decent RoR
server on my dedicated server (Ubuntu 6.06 LTS), and now, everything
works.
However, the performances are not really what I had expected... I would
like to know what you think about it.
Here is my config: 2GHz VIA proc, 1Gb RAM, SATA-II HD.
I have apt-got ruby 1.8.4, mysql5 and installed rails 1.1.4 by
2006 Apr 20
11
dynamic mock object anyone?
Hi guys, got this problem with creating such a thing... hope anyone
could help..
the problem:
ok, now i have this mock object that would simulate a external rpc call.
eg
require ''models/xmlrpc_agent''
class XmlrpcAgent
def create(params)
200
end
end
but the value of the value returned is fixed. which is quite hard for me
to test the controller when different
2006 May 14
0
Invoke .Net WebService error in RoR
....Services.WebService
{
[WebMethod]
public string HelloWorld(string name) {
return "Hello, " + name;
}
}
--------------- END of Servcie.cs --------------------
In test_api.rb:
api_method :HelloWorld, :expects => [{:name => :string}], :returns => [:string]
In test_controller:
web_client_api :test, :soap, "http://localhost/test/Service.asmx",
:namespace => "http://tempuri.org/",
:soap_action_base => "http://tempuri.org",
:driver_options=>{:default_encodingstyle =>
SOAP::Encodi...
2006 Apr 10
1
Error When Sorting
...s", "id"=>"5",
"controller"=>"admin/test"}
NoMethodError (You have a nil object when you didn''t expect it!
You might have expected an instance of Array.
The error occured while evaluating nil.each_with_index):
/app/controllers/admin/test_controller.rb:52:in
`update_question_positions''
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/base.rb:908:in
`send''
--
Posted via http://www.ruby-forum.com/.
2007 Jun 10
0
pb when posting to an action "render_text body, :status => 400"
...rom the openid server example)
This is working fine with webrick, but not in mongrel 1.0.1 on osx where the
consumer get :
Net::HTTPBadResponse: wrong status line: "HTTP/1.1 0 "
If someone wants to try, just make a rails app :
rails test
script/generate controller test index
and in the test_controller define the action ''index'' like that :
class TestController < ApplicationController
def index
render_text "test", :status => 400
end
end
you can know test this with irb (supposing the server is running on port
3000) :
require ''uri''
requi...
2006 Mar 29
0
Bug with skip_before_filter?
...r will be run for all controllers in
the application.
# Likewise, all the methods added will be available for all controllers.
class ApplicationController < ActionController::Base
before_filter :test_filter
def test_filter
flash[:notice] = "The filter was called"
end
end
test_controller.rb
class TestController < ApplicationController
skip_before_filter :test_filter, :only => :index_no_filter
def index
end
def index_no_filter
end
end
--
Posted via http://www.ruby-forum.com/.
2006 Jan 30
9
error when adding a new table to the existing application
Deniz wrote:
> Hi Everybody,
> I am a newbie in this list so please forgive me if this is a lengthy
> message.
> Currently I am working on a project at my work place that includes
> viewing some oracle tables(I do not have control over to rewrite the
> tables) and searching the tables based on a given criteria with Rails.
> Up untill now everything was working great. The
2006 Jan 17
4
textarea problem with accentued chars
...:message] return => ?nial
params[:comment][:message][1] return => 195 ! ( 195 is not "?" ,
http://www.asciitable.com/ )
params[:comment][:message].inspect return => "\303\251nial"
and in ddb I store "??nial"
Someone can help me please ?
//
test_controller.rb :
------------------
class TestController < ActionController::Base
def index
end
def post
@var1 = params[:comment][:message]
@var2 = params[:comment][:message][0]
@var3 = params[:comment][:message].inspect
hash = { :name => params[:comment][:message] }
obj = Color.n...
2005 Jul 20
5
Can't connect to MySQL on another machine
...er privileges seem to be configured properly, e.g. I can
connect to a database using "mysql" from the Powerbook, alter the
tables etc without any problems.
However, I can''t get Rails to connect to the same database. (just a
simple app with one model called "Test" and a test_controller with
"scaffold :test" in it). What I get is:
----
Mysql::Error in Test#index
Access denied for user ''''@''192.168.0.3'' (using password: NO)
----
Here''s what database.yml looks like:
----
development:
adapter: mysql
database: dbname
host...
2006 May 04
6
second assert_tag failling in rails integration test
...rong with my
assumptions or if it really is an error in the underlying framework...
I''ve created a bare-bones set of tests to show you where the problem is.
What follows are the steps I went through to reproduce the issue.
1) run "rails test"
2) create a controller called "test_controller":
class TestController < ApplicationController
def one
render_text(''one'')
end
def two
render_text(''two'')
end
end
3) create an integration test:
require "#{File.dirname(__FILE__)}/../test_helper"
class MyTest < ActionContr...
2006 Apr 07
22
Find WHERE in Rails
I''d like to find all records that have a certain integer as their
"level" field in the database. I know how to find all the records:
allquestions = Question.find(:all)
...and I know how to find the one record that has a certain id:
allquestions = Question.find(params[:id])
...but how do you find all the records that share a certain value in one
of their fields? I tried
2006 Oct 01
9
How to create a very simple form
Hi all,
I would like to create a very simple form with RoR similar to this one
in ASP.Net:
http://quickstarts.asp.net/QuickStartv20/aspnet/samples/ctrlref/standard/TextBox/TextBox1_vb.aspx
I my RoR project I want to add a Greeter class like this one:
class Greeter
def initialize(name = "World")
@name = name
end
def say_hi
puts "Hi #{@name}!"
end
def
2013 May 31
11
A simple javascript alert not working
If I have a file in view /test called index.js.erb and in it a simple
alert("hello") shouldn''t that run when I go to /test/index? It doesn''t.
--
Posted via http://www.ruby-forum.com/.
--
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,
2006 Jul 10
10
Problem using Feedtools on my Rails project!
...in
`sanitize_html''
/usr/local/lib/ruby/gems/1.8/gems/feedtools-0.2.25/lib/feed_tools/helpers/html_helper.rb:564:in
`process_text_construct''
/usr/local/lib/ruby/gems/1.8/gems/feedtools-0.2.25/lib/feed_tools/feed_item.rb:328:in
`description''
#{RAILS_ROOT}/app/controllers/test_controller.rb:4:in `index''
/usr/local/bin/mongrel_rails:18
I''ve put the ''require ''feed_tools'' line in my config/environment.rb
BUT the most amazing thing is that I can run script/console and, lo and
behold:
>> require ''feed_tools''
=>...