Displaying 20 results from an estimated 60000 matches similar to: "Updated patches, please apply!"
2007 Jun 25
1
has_many with :dependent => :nullify
Hi all,
There is something confusing with has_many in the current API :
When deleting a record with association.delete, the corresponding
association''s foreign key is nullified. However, if has_many has
the :dependent option set (to any value), the association''s destroy
method is called instead.
This is awfully inconsistent with the behavior expected when
setting :dependent to
2007 Dec 11
2
Patch 10463: has_many through using uniq does not honor order
Hi,
I''ve just submitted a patch for ActiveRecord;
http://dev.rubyonrails.org/ticket/10463
The patch includes new fixtures because I could not find a applicable
combination among the existing fixtures. I hope that''s okee.
Please +1 or comment it.
Thanks,
Remco
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
2007 Nov 07
0
#7334: FIXTURES_DIR for db:fixtures:load
I added another patch for #7334 that adds a FIXTURES_DIR option to the
db:fixtures:load task. This is really helpful for those using rspec.
It also adds a db:fixtures:dump task.
These two tasks in combination also provide a great way to backup and
restore data.
Please add some +1''s to the ticket or give constructive criticism.
Thanks,
Brandon
2008 Feb 07
2
[CruiseControl] RubyOnRails build 8820 fixed
The build has been fixed.
CHANGES
-------
Revision 8820 committed by bitsweat on 2008-02-07 23:10:01
Remove empty .rhtml templates
D /trunk/actionmailer/test/fixtures/templates/signed_up.rhtml
D /trunk/actionmailer/test/fixtures/helper_mailer/use_example_helper.rhtml
D /trunk/actionmailer/test/fixtures/first_mailer/share.rhtml
D
2010 May 26
3
Plugin test fixtures
Just spent a good bit of time trying to figure out why I couldn''t get
fixtures to work in a plugin test. I was including
ActiveRecord::TestFixtures into ActiveSupport::TestCase and trying to
get fixtures to automatically reload for every test like regular Rails
tests.
The problem was in the first line of
ActiveRecord::TestFixtures.setup_fixtures:
return unless defined?(ActiveRecord)
2006 Jun 07
3
#5209 patch: :dependent => :nullify deletes child records
Hi everyone,
A couple of weeks ago I noticed a bug with :dependent => :nullify on
a has_many or has_one. When you delete the parent, the children''s
foreign keys are nullified, as expected. But when you do
parent.child.delete or parent.children.clear, ActiveRecord actually
deletes the child records, rather than just nullifying them.
In my eyes, if you''ve set
2007 Apr 30
2
acts_as_tree
Hi folks,
For my app, I needed to modify acts_as_tree (ActiveRecord::Acts::Tree)
such that deleting a node would orphan sub-nodes, rather than deleting
them. This is accomplished simply by allowing a :dependent option to
the acts_as_tree method so that it can be set to :nullify. For my app,
I simply did this by adding a file tree.rb to my lib directory and
requiring it in the model.
A number
2006 Apr 24
4
[TIP] Ensure your test data is valid
Recently I wanted to check that my test data was valid. Seems like a
reasonable thing to want to do so I thought I''d share the rake task. Add
this code to a rake file in lib/tasks and run with rake
db:fixtures:validate. It will print out the class, record id and error
messages for any model objects that fail validation.
Enjoy!
-Jonathan.
--
namespace :db do
namespace :fixtures do
2006 Dec 08
2
Windows Tempfile Fix Plugin
Hi all,
Yesterday, I had some problems reading JPG files in my tests. Turns
out the problem was that Windows Ruby doesn't set it's Tempfile to
work in binary mode. Since I deploy on Linux, that has never been a
big problem, but now I'm working on some software that works with
binary files exclusively.
Anyway, I am making this fix available as a Rails plugin.
The details can be
2008 Feb 12
4
Funny behavior with Fixtures... on Ubuntu..
Hey Guys,
I''ve got a test class that loads a bunch of fixtures. My understanding
is that fixtures are reloaded between each test... and I even have the
following two method calls at the top of my test class to make doubly
sure...
class TaskTest < Test::Unit::TestCase
self.use_transactional_fixtures = true
self.use_instantiated_fixtures = false
When I run my tests
2007 Dec 01
10
Fixtures Cleanup
All,
I''ve been playing a bit with some patches to make the fixture loading
and management code a little bit easier to maintain. If I were to
start chopping out features, how would you feel about losing:
Fixture instantiation,
Old school single-file fixtures,
CSV fixtures,
The ability to specify a subset of fixtures (everything''s always
loaded instead),
The ability to
2006 Mar 02
1
Fixture accessors broken for polymorphism, in need of redesign
Ticket 4052 (http://dev.rubyonrails.org/ticket/4052) just came through
trac, which introduces the need for a better way to access fixtures. I
believe the basic problem is the same as 3935
(http://dev.rubyonrails.org/ticket/3935) in that the accessor method
which is constructed by the fixture call can''t infer the class name
from the table name. The band-aid in 3935 was to allow you to
2008 Nov 19
0
has_many through select box in form
Gentlemen,
I have searched the group and have not found any post that clarifies
thsi s=issue to me. Please forgive me in advance if I missed
something.
I have 3 models:
Ticket
has_many :citations, :dependent => :nullify
has_many :violations, :through => :citations
Violation
has_many :citations, :dependent => :nullify
has_many :tickets, :through => :citations
Citation
2007 May 07
7
A little love for acts_as_taggable #8279
I was working with acts_as_taggable earlier and thought I could make
it a bit friendlier.
I submitted a ticket and patch #8279. Basically, there are three
differences.
1. Fixed the deprecated :dependent => true
2. Added migration generator (it has really specific requirements on
table layout, so might as well generate it).
3. Expanded the README to explain using the migration and to include
2007 Dec 07
2
[ActiveSupport] Patches needing review: re-organization of #to_query methods, preservation of XML/JSON content-type
Just a quick pointer to some ActiveSupport patches hoping for reviews:
Puts Array#to_query and Object#to_query in the right places in
ActiveSupport - http://dev.rubyonrails.org/ticket/10395
Preserve user-specified content type for XML and JSON rendering
(currently it''s overridden and set to Mime::XML/Mimi::JSON -
http://dev.rubyonrails.org/ticket/10388
Oh and a tiny patch for
2007 Aug 12
0
ActiveRecord with only a primary key
Hi,
ActiveRecord does not currently support tables that have only
a primary key.
This seems to be a needed feature as evidenced by the tickets:
http://dev.rubyonrails.org/ticket/6187
http://dev.rubyonrails.org/ticket/6319
http://dev.rubyonrails.org/ticket/7877
The update case is easily fixed by just not running the query
when there are no columns to update. But the create case is
problematic
2012 Jun 08
1
Announce: puppetlabs_spec_helper 0.1.0 Available
puppetlabs_spec_helper is a Rubygem to make writing and running module spec
tests using rspec-puppet easier. It includes a set of common rake tasks and
a spec_helper that correctly initializes puppet and rspec-puppet for
testing.
The code is available on github at
http://github.com/puppetlabs/puppetlabs_spec_helper. Patches are welcome.
To convert a module with existing spec tests to use the
2007 Nov 20
2
Anyone using to_xml and procs...
I''m looking for comments on http://dev.rubyonrails.org/ticket/10162
In my opinion, the current behaviour is a bug, and should be fixed.
If you have a use case where passing procs to the child associations
is actually useful, chime in.
Jonathan del Strother
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
2007 Jul 23
0
Request for review of activesupport patches
I''ve got a test suite trifecta going here; all three need review, comments
and (hopefully) approval:
http://dev.rubyonrails.org/ticket/9019
"Fix time_with_datetime_fallback on really old dates"
This is a bug in time_with_datetime_fallback. The test suite currently
fails for me without this patch.
http://dev.rubyonrails.org/ticket/9020
"Fix activesupport time tests"
2008 Jan 02
0
Re: RubyOnRails build 8525 failed
Fix for the bad (failing) test here: http://dev.rubyonrails.org/ticket/10664
On Jan 2, 5:33 pm, alexey.verkhov...@gmail.com wrote:
> The build failed.
>
> CHANGES
> -------
> Revision 8522 committed by bitsweat on 2008-01-02 09:03:56
> db:sessions:clear task uses session_table_name method. Closes #10631 [Cheah Chu Yeow]
>
> M /trunk/railties/lib/tasks/databases.rake
>