Displaying 20 results from an estimated 21 matches for "livesey".
2006 Mar 14
15
in_place_editor_field -- values not clickable
Hallo -- I''ve just installed the latest stable version of rails, and am
following the rails recipies book''s first recipie -- using
in_place_editor_field.
My problem is that the code throws no error, but the resulting fields
are not editable -- the values just come up as text, rather than
clickable-then-editable fields.
Can anyone help shed any light on why this might be the
2008 May 20
4
mock_model not stubbing model attribtues in view spec
Hi -- I am just getting to grips w/ view specs, and am having an issue
with mock_model not stubbing the mocked model''s attributes.
For instance, I have the following:
<CODE>
before do
@input_timesheet = mock_model( InputTimesheet )
assigns[:input_timesheet] = @input_timesheet
end
it "should display a table element" do
render
2009 May 13
8
Sharing sessions across rails apps 2.3.2
I''ve done this in 2.2, but cannot figure it out for 2.3.2:
Basically, I want to be able to share session data across a couple of
apps.
The way I did this in 2.2 was to create a view called sessions in the
second app that read the sessions table of the first app.
This done, I could tell them both to use active record sessions, and,
lo! I had a shared session.
Once I''d written a
2006 Mar 24
3
JS validation on a form/submit tag? Like :condition=>...
Hallo -- is there a way anyone know of that I can add a :confirm clause
to a form submit? Something like:
<%= submit_tag ''commit'', :confirm=>"are you certain?" %>
Does anyone know how to achieve this?
Cheers,
doug.
--
Posted via http://www.ruby-forum.com/.
2008 May 23
4
Is there an equivalent to anything() for Hash parameters?
Hi -- is there an equivalent to the anything() method to use with Hash
parameters?
So that the following call:
Model.find( :all, :conditions => "name LIKE ''%rt%''", :order => ''name''
)
Could have the two following successful examples:
Model.should_receive( :find ).with( :all, { :conditions => "name LIKE
''%rt%", anything }
2008 Feb 29
17
Is SQL Server not supported in RoR on the Mac?
Hi -- I''ve been having problems connecting to a SQL Server database that
I thought might be related to the fact I was upgrading Rails to 2.0.
However, I also was moving the project to my shiny new macbook.
Anyway, after jumping through a few hoops (instaling DBI, etc.), I
finally get to my latest error message:
<error>
DBI::InterfaceError: Could not load driver (no such file to
2006 Mar 28
8
Problem connecting with an SQL Server 2000 database
Hi,
I?m working on a rails application that uses data from an existing ms sqlserver 2000 database.
Unfortunately I can?t get the connection to work properly.
I used http://wiki.rubyonrails.com/rails/pages/HowtoConnectToMicrosoftSQLServer to make the connection.
- Inserted the ado.rb
- Changed my database.yml to
development:
adapter: sqlserver
database: database_name
host:
2008 May 23
2
Error when trying to get the install RSpec from Github
Hi -- I''ve tried to get the latest RSpec by following the instructions
at:
http://github.com/dchelimsky/rspec/wikis/home
I clone the repository just fine, but then, when I ''rake gem'', I get the
following errors:
<OUTPUT>
svn: ''..'' is not a working copy
svn: Can''t open file ''../.svn/entries'': No such file or
2008 Jun 05
1
Using and_yield to pass multiple or no iterations
Hi, imagine there''s a class called Egg which has the following method
(which calls another method):
<CODE>
def do_thing
has_iterated = false
self.each_row do |row|
has_iterated = true unless has_iterated
end
has_iterated
end
</CODE>
Stupid code, I know.
I have two questions with it. The first is, would it be possible to set
it up to test the case when each_row
2012 Jul 30
1
Installing phusion passenger with puppet
Hi -- all the docs I can seem to find are related to running puppet with
passenger, but not installing it.
Does anyone know of any recipes I can use to actually install passenger
with my server''s Ruby and Apache installs?
Thanks,
Doug.
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to
2005 Oct 25
1
initialising an instance variable on ActiveRecord creation
Hallo, I have a table like this:
create table properties(
id bigint unsigned not null auto_increment,
property_variable_stack_id bigint unsigned not null,
primary key(id),
foreign key (property_variable_stack_id) references
property_variable_stacks (id))
type=InnoDB;
Here you can see a reference to a table property_variable_stacks.
>From outside the Property class I can set up a Property with
2009 Apr 22
15
Why RSpec?
I like Shoulda. Sometimes I like plain old Test::Unit. Cucumber
gives me a different thought process.
I''d just like to hear some thoughts on why RSpec? What does it buy me
that I can''t get with Shoulda? I just can''t seem to think in RSpec.
Where is there a good example of RSpec tests that will help me grasp
the right path?
Thanks!
--
Amos King
2006 Mar 27
3
Migration commands -- create a SQL Server production DB?
Hallo -- could anyone tell me how I use Migrations (which my existing
development schema is implemented with) to create the production
database for deployment?
The target DB is a SQL Server database -- I don''t know if that''s an
issue -- I seem to remember reading that SQL Server is supported now.
Oh, yeah -- SQL Server was *not* my choice!
But what I seem totally unable to
2011 Jan 02
3
undefined method `run_all' for :Array
I''m using the latest ruby 1.9.3-head and recently whenever I run rspec
(2.2+) I get the following error:
I have seen others have run into this issue, but to resolve it just
rolled back to a previous version of rspec or it there a better way?
ruby-1.9.3-head/gems/rspec-core-2.3.1/lib/rspec/core/hooks.rb:116:in
`run_hook_filtered'': undefined method `run_all'' for []:Array
2008 Jul 24
0
Speccing a respond_to block outside of a request
Hi -- I have a bunch of controllers whose index actions are so similar,
I can safely stick most of the code in a superclass.
I am having trouble, however, in speccing the index method in the
superclass.
It could look like this: http://pastie.org/240207
This is the class that the controllers that would actually get called
would inherit from.
I want to describe SuperController#index in a spec, so
2006 Jul 26
1
fixtures not loading when running rake test - ok other times
Hallo -- I have the most bizzare problem.
I have a test called PropertyTest that runs absolutely fine. Even if I
totally clear the test database before running it, it happily scoots
off, loads all necessary fixtures, runs & passes all tests.
My problem arises when I run rake test:units.
Then, all other tests pass fine, but this one starts failing as if the
fixture data simply
2006 Jun 09
0
validated_associated -- how do I assign invalid collection?
Hi -- if I have a class that declares ''validates_associated'' on a number
of other classes, is it supposed to be relatively easy to replace a
collection of them?
Not to overwrite them in the DB, but simply to assign them to their
retrieval method, so that they can be included as part of the owning
class'' validation.
I mean like:
children_with_potential_errors =
2006 Jun 12
0
validates_associated -- explicitly setting collection?
Hi, I have a class (say Parent) that has many of two other classes, say
FirstChild and SecondChild. These could look like this:
class Parent < ActiveRecord::Base
has_many :first_children, :dependent => true
has_many :first_children, :dependent => true
validates_associated :first_children
validates_associated :second_children
end
class FirstChild < ActiveRecord::Base
2006 Mar 09
2
issuing raw SQL in Rails
Hi -- I have a need to run the following SQL in a test:
"DELETE FROM agents_bookings"
Does anyone know of a way that I can just execute this?
It is to clear a many-to-many relationship in the teardown function of a
test.
Cheers,
doug.
--
Posted via http://www.ruby-forum.com/.
2007 Sep 04
1
Routing error with nested resources
Hi -- I have a routes.rb file with the following in it:
<CODE>
map.resource :admin do |admin|
admin.resources :users
admin.resources :clients do |client|
client.resources :client_properties
end
admin.resources :areas
admin.resources :properties
end
</CODE>
My problem is when I try to access the show or edit actions of the
client_properties resource.
The