search for: digitalphenom

Displaying 10 results from an estimated 10 matches for "digitalphenom".

2007 Jun 07
6
Problem with response.should render_template
Hello, I have problems with this spec controllers: http://pastie.caboo.se/68634 when I run: rake spec:controllers I get this error: ...............F...... 1) ''DocTypeController should update and redirect to show'' FAILED expected redirect to {:action=>"show", :id=>1}, got redirect to
2006 Apr 14
1
ActiveRecord and multiple associations
Hello, I have a Company that has_and_belongs_to_many Persons. A Person has_many Emails. I want to display each Person''s Email for each Company, so I try this: companies = Company.find(:all) for company in companies persons = company.persons for person in persons puts person.email end end Unfortunately, this doesn''t work correctly. Let''s say the id of
2006 Apr 19
9
Does RoR + Oracle use bind variables?
Does ROR + Oracle use bind variables? Using :conditions in a find statement gives the appearance that bind variables might be used : header = "test header" Posts.find(:all,:conditions=>["header = ?",header]) i.e. Does AR just pass the whole string to oracle or the SQL and the parameters? I''m in an oracle shop and my boss wants to know, i''d be very
2007 May 24
25
Specs for ApplicationController, where to put them?
The Rails ApplicationController (app/controllers/application.rb) serves as an abstract superclass for all other controllers in a Rails application and is a good place to put methods and filters which you want all of your controllers to use. In my case I''m using it to provide methods such as "current_user" and "logged_in?" etc. By default, RSpec
2007 Jul 11
21
"they" synonym for "it"?
I''ve noticed that I phrase a lot of shared behaviours in plural, eg describe "All payment_details views" How about a "they" alias to "it" so you can write describe "All payment_details views", :shared => true do they "should have a card number field" do # ... end end WDYT? Ashley
2006 Jun 26
0
Directory/file permissions for Rails app on Apache 1.3.x and fastcgi on Linux
Hello, folks! I was wondering what the recommended permissions are for the following directories/files in a Rails app: /log (755 seems to work) /log/fastcgi.crash.log (666 seems to work) /log/production.log (666 seems to work) /tmp (707 seems to work) /tmp/sessions (707 seems to work) More specifically, why does the executable bit for all users need to be set for the /tmp/sessions
2006 Nov 04
0
Using Field Helpers to Edit a Related Model Object
Hello folks, Here''s a question about creating an edit screen for a model and a related model. On page 355 of the AWDWR book (printed page 464 of the 2nd edition pdf), there''s a little table showing how form parameters map to the params object. One of them is: user[address][city]=Wien ... maps to params as ... { :user => { :address => { :city =>
2008 Mar 20
1
Combining autotest, rspec, rspec_on_rails and spec-server
Hello, I''ve been trying to google the definitive way to combine autotest, rspec, and spec-server, but to no avail. It seems like there are lots of suggestions from old versions. Furthermore, some commands such as rake:autotest don''t seem to be around anymore. So, is it required to install ZenTest as a gem? I have version 3.9.1. I believe this gets me the autotest
2006 Mar 12
5
Authentication and authorization of static content
Hello, I''m a Java programmer looking to make my life easier. Thus, I''m considering using Rails for my next project. I''ve read chunks of the Agile book and it looks like authorizing users at the Controller level is dead easy to do. However, I have a need to password protect static content in my site. In the J2EE world, I would use a servlet filter to intercept
2007 Jun 15
6
problem getting started with stubbing in rails controller specs
Hello, Ingo! I''m copying your question to a new e-mail instead of replying to try to keep message threads separate. Have you tried setting up your expectation before issuing the get statement? For example, take this out of the setup block: get ''index'', :locale => ''en'' and move it after: