similar to: Calling a Controller method from the command line

Displaying 20 results from an estimated 1000 matches similar to: "Calling a Controller method from the command line"

2006 Aug 13
1
Is :finder_sql using #{id} broken?
Hi All, It seems that :finder_sql in a HABTM association only interprets a single quoted #{id} the first time through a query. I see examples of this being used in a few places (though with has_many) and I don''t really see how to use :finder_sql without a #{id}. Am I missing something or is this just broken? -- Paul Haddad (paul.haddad@gmail.com paul@pth.com)
2007 Sep 17
2
Why do we check for the controller file?
I remember having this discussion on IRC before, so Ezra if you could remind me that would be appreciated: Why do we check for the existence of the controller file in (what is now) Request#controller_class? The reason I ask is that I would like to implement some sort of "Rails engine" like features for gem plugins--in other words, drop in a gem that has controllers/views etc.
2007 Dec 06
10
Feedback on RC2
I tried to upgrade my existing application to RC2 last night. Like many, I use this mostly for running scheduled tasks. For the moment, I''ve abandoned the effort, but am looking forward to being able to use this. Feedback below: First, the reason I was looking forward to this upgrade was to use the threaded scheduler. I have an application with long-running tasks. I found that
2006 May 17
1
Concurrency
Hello, I'm very intersted in developing a site using your platform. I was wondering if you've tested the theoretical maximums for this software and can show me some numbers. How many simultaneous users could I expect to handle at 128k (hardware not being the limiting factor)? If you'd like to speak please send a number and a good time to call. Sincerely, -- Eric Haddad
2012 Nov 19
0
expand time period
I'd like to expand the following data to perform a daily time series. It should cover from '2012-07-01' to '2012-10-06' with the values I actually have being the mean from one point measurement to another. Does anyone has a clue to perform this task. structure(list(Date.beg = structure(c(15635, 15617, 15615, 15610, 15609, 15605, 15604, 15601, 15593, 15593, 15586, 15581,
2007 May 04
11
spec template for CRUD?
Hello, Has anyone already come up with a set of shared behaviours that someone could leverage when adhering to a CRUD concept, with respect to controllers? Relatedly, it would be nice if there were a way to share generalized behaviour specs. -Chris
2006 Jun 16
4
Unit test and get request with a URL
I''m tyring to write a unit test that uses a get() method to simulate a get request in my functional test. However, get wants an action, and I have a URL. I''m trying to redirect to a URL the user tried to hit before logging in. After they login I want to go back to the URL they originally tried. I can''t find the get() method code in the help or otherwise. I
2006 Apr 27
6
Functional Test Problem. Nubee, please help
ALl my controllers require the user to be logged in. SO they will be redirected to my "login" controller. How do i login first in a functional test? Im assuming i use the setup method to login the controller. This is the setup method for the Activities controller functional test: def setup @controller = ActivitiesController.new @request =
2006 Feb 03
2
testing to see if emails are sent out on exceptions
Hi, I''m using ActionController::rescue_action_in_public() to send emails when uncaught exceptions happen. Is it possible to write tests for that? Joe
2012 Jun 08
1
[Rails 3.2.5] Rails: unit test fixture_path : fixture_file_upload cannot find the file ...
I am trying to perform a test unit, using FactoryGirl include ActionDispatch::TestProcess FactoryGirl.define do factory :article do ....... photo { fixture_file_upload ''/files/test.jpg'', ''image/jpg'' } end end IN mt test_helper.rb I defined the fixture_path def fixture_path File.dirname(__FILE__) + "/fixtures/" #
2006 Apr 14
8
Error with Web Service tests after upgrading to Rails 1.1.2
Hello. I hope this is the right place to describe my problem ? After upgrading to Rails version 1.1.2 from rails version 1.0.0, Web Service functional tests seem broken. I upgraded rails (as the root user / administrator) with: # gem update rails --include-dependencies then I upgraded my application (as myself) with: ? rake rails:update % rake rails:update:configs After these steps,
2006 May 09
1
Rails freeze, weird error
Hello -- So, I have a bunch of apps on my dev box, all currently v1.0.0. I thought I could use the freezing techniques to test each app for 1.1.x compatibility individually, but that doesn''t seem to be working out... First, I checked out from http://dev.rubyonrails.org/svn/rails/tags/rel_1-1-2/ into vendor/rails Then I ran "rake rails:update". Then I went into console, and
2005 Jan 29
6
Newbie: Unable to run new controller.
I''m only just learning to use Rails, but this seems like something very out of my control. I used GEM to download and install Rails, then created a new application and a controller and started the WEBrick server. When I try to access the new controller "Test" using http://localhost:3000/test/ I get a "Not Found" error and a great deal of output from the server
2012 Apr 05
1
using for loops with ggplot
Hi all, I have been using ggplot for a few months and ran into this porblem, I am trying to use ggplot in a for loop and it is not working. if I do the following: data=as.data.frame(cbind(rnorm(10),rnorm(10),rnorm(10))) ############ pp=ggplot(data, aes(x=(1:10), y=data[,1])) pp=pp+geom_line(aes(x=(1:10),y = data[,1]),lty=2) pp=pp+geom_line(aes(x=(1:10),y = data[,2]),lty=2)
2006 Jul 02
5
"the number of parameters does not match the number of substitutions" error
All of a sudden, I''m getting this error: 1) Error: test_index(AccountControllerTest): RuntimeError: The number of parameters does not match the number of substitutions. /home/joe/projects/tanga/trunk/config/../vendor/rails/actionpack/lib/action_controller/assertions.rb:92:in `assert_redirected_to''
2008 Jun 12
1
Which "get" is being used in Controller spec
Hi, I''m a bit puzzled with "get" in controller specs. When I write, it "should render index template" do get :index response.should render_template(:index) end Which "get" method is being used? I checked RDoc of RSpec and RSpec on Rails, but didn''t find "get". In Rails RDoc, I found the following "get"s. get
2006 Nov 02
2
Rescue don't work on web applications
Hi, I''ve a Rails application who starts a Ruby script . The script is made via Web -> database. Than you can select a script to start via a database list. Problem: In case of errors , I like to start a rescue showing the users the problems. render(:text => "<pre>" + CGI::escapeHTML(` begin /home/luc/radrails/cpe/public/startq_test.rb
2007 May 04
6
Rspec on Merb Plugin - Initial thoughts?
A couple days ago I submitted a patch, that was committed by Ezra, to the MrBlog project for the Rspec on Merb plugin. So far, it only works with ActiveRecord including fixtures. Has any played with it? If so, did you get it to work? I''m going to be submitting a patch for Controller specs soon. It will be very bare bones, given my current lack of understanding of Merb controller
2004 Aug 09
0
Samba 2.2.7 terrible slow with Windows XP SP1
I have Samba 2.2.7 installed in a FreeBSD 4.7 server acting as a PDC. Every folder listing in our main shared folders (drive H: mapped during login script) is terrible slow. Initially I checked my server disks, partitions and virtual memory status and verified that everything is okay. My SMB.CONF is: ; ======= BEGIN SMB.CONF =========================== [global] netbios name =
2007 Feb 08
3
testing ajax responder actions
I have an Ajax responder method which uses respond_to to make sure it only works with Ajax. I''m having trouble figuring out how to call this action successfully. I''m using Rails 1.2.x. Any thoughts? -- Cheers, Kevin Williams http://www.almostserio.us/ "Any sufficiently advanced technology is indistinguishable from Magic." - Arthur C. Clarke