Displaying 20 results from an estimated 10000 matches similar to: "SQLite3 build is broken because calling rollback!() doesn't prevent COMMIT"
2007 Jul 22
18
db:fixtures:load order
I was trying to deal with foreign key issues related to order of
fixture loading when I came across this:
http://techpolesen.blogspot.com/2007/04/rails-fixture-tips.html
This got me looking deeper into rails and I noticed that
db:fixtures:load calls Fixtures.create_fixtures once for each fixture
file. However, Fixtures.create_fixtures is capable of taking multiple
files and also handle the
2005 Oct 03
3
Boolean quoting, postgresql
http://dev.rubyonrails.org/ticket/1117
I''ve attached a patch to ticket 1117 which fixes it so that booleans
are escaped as booleans, not integers. Specifically, this situation
will now work
find_all(["send_date=? and sent=?", Date.today, false])
Which matches peoples expectations, but it causes some problems with
the postgresql unit tests. Specifically, the use of
2005 May 06
17
FYI: watch out for google's web accelerator - can empty your app of data
Hi All,
A co-worker passed this info on to me:
http://37signals.com/svn/archives2/google_web_accelerator_hey_not_so_fast_an_alert_for_web_app_designers.php
The Skinny: Google has a "Web Accelerator" that pre-caches pages by
following url''s. If you have any plain/simple URL''s that don''t take
paramaters (like what often happens in rails apps), it will try to
2007 Jun 27
5
Filter Ordering in Edge Rails (Rev 7143)
Filter chaining appears to behave in differently than Rails 1.2.x. It
seems that I''m getting a lot of errors along the lines of:
ActionController::ActionControllerError: filter
#<ActionController::Filters::ClassMethods::BeforeFilterProxy:0x322f468
@filter=#<ActionController::Filters::ClassMethods::SymbolFilter:
0x322f4b8 @filter=:login_required>> was in the wrong place!
2008 Jan 21
8
Polymorphic URL helpers documentation and fixes
Yesterday I answered a question regarding polymorphic URL helpers on Core ML
and noticed that the module has no documentation. I''ve documented it and
rewritten unit tests using Mocha. I also optimized some of the code slightly
(nothing major, though). The patch also includes two fixes by Geoff Buesing,
who has done awesome work in this area in the past.
2011 Mar 22
2
Problems with SQLite3
Hi!
I''ve got a very strange problem. Suddenly the SQLite3 Backend stopped
working.
Example 1:
> rake db:rollback
== CreateProducts: reverting
=================================================
-- drop_table(:products)
rake aborted!
An error has occurred, this and all later migrations canceled:
SQLite3::SQLException: near "CASCADE": syntax error: DROP TABLE
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 Jul 16
6
RubyToken::AlreadyDefinedToken and Edge Rails Docs
I''m having a wee bit of trouble building documentation for Edge Rails
(rev 7187). When I attempt to run the doc:rails taask (or any doc:*
task), I get the following error:
-- BEGIN --
rake aborted!
uninitialized constant RubyToken::AlreadyDefinedToken
/Users/jherdman/Projects/crosslisting/vendor/rails/activerecord/
lib/../../activesupport/lib/active_support/dependencies.rb:263:in
2007 Jul 06
4
JOINS clobbering ids or other fields.
I just found this ticket because I noticed the same issue.
http://dev.rubyonrails.org/ticket/6251
The official response was that it''s not a bug because when you use
:joins you are "riding close to the metal". But I''m at a loss as to
figure out why this behavior even needs to exist.
Every table (except HABTM links) in a typical Rails app is going to
have an id
2007 Oct 24
5
Utility that checks outdated patches
I just noticed I frequently encounter patches that need to be updated
because of applied changes. Maybe this can be automated? Not
automating the "updating of the patch" part, but the part where a
comment is posted to the ticket so the submitter is informed.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
2010 May 27
4
[PATCH] Rails 3: fields_for helper doesn't work with association proxy objects
Request for eyeballs. :-)
Mongoid uses association proxy objects. It overrides #nil? => false
when the association is missing. However since it uses proxy
objects, !!assocation is always true.
I have created a ticket with a patch that changes the association nil
test to call assocation.nil? rather than use implicit coercion of the
variable.
See:
2010 Jul 23
7
fail rollback transaction with manual raise exception
With :
PostgreSQL 8.4 or postgresql-8.3
rails 2.3.4
pg 9.x or pg 8.x
I test this code:
=========================
class NkiBatch < ActiveRecord::Base
Bank.connection.transaction do
bank = Bank.new(:name => "ddsjdsjdsjk")
bank.save!
raise ActiveRecord::Rollback.new
end
end
and this:
=========================
class NkiBatch < ActiveRecord::Base
2010 Apr 15
12
[PATCH] Add :touch option to has_many associations
Hi,
it would be nice to have the touch option in has_many associations also.
I have a scenario like this:
An user has some credit (money) and some advertises. Each advertise can be
enabled or disabled depending on some rules. One of the rules is that the
user should have money. Each time the money of the user change, the
advertises are touched, enabled/disabled and then cached, as they are much
2005 Aug 09
3
Adding created_by and updated_by trouble
Hi everyone. This is a real noob question that I''m hoping someone out there
can help me with.
I have followed the tutorial How to Ad created_by and
updated_b<http://wiki.rubyonrails.com/rails/show/Howto%20Add%20created_by%20and%20updated_by>y
and it works ok for retrieving the data. I''m using the Login_Generator.
I cannot get it to work on create or update. I think
2005 Jun 29
3
Setting the value of a primary key field
I have a table that is to hold all ISO 639 language codes: alpha3t, alpha3b,
alpha2, that bunch. It also (indirectly) holds language names, but
that''s off-topic.
alpha3t is the primary key, so I''ve told Active Record about this by saying
set_primary_key "alpha3t" within the Language model. (Don''t try to call your
models things like ISO639 (won''t work
2011 May 08
1
Transaction - but no rollback?
Hello,
I''m having trouble with transactions with rails 3.0.3 and mysql 5. I''d
like to import data etl-batch-style:
class Job < ActiveRecord::Base
# ...
def perform_etl
connection.transaction do
extract # some connection.execute / job.update_attribute stuff
transform # some connection.execute / job.update_attribute stuff
end
end
#...
end
2007 May 17
4
Namespaced model valid #to_xml support in ActiveRecord, ActiveSupport and ActiveResource
Hi,
Attached are links to two patches I submitted via the RoR Trac system
a week or so ago:
http://dev.rubyonrails.org/ticket/8305
http://dev.rubyonrails.org/ticket/8308
I refrained from creating a new Trac ticket for ARes, which will be
affected if both of these patches are accepted by Core.
There are a couple of workarounds for this issue, but it would be nice
for AR, AS and ARes to output
2010 Nov 05
9
[patch] Let's use <%== %> instead of <%= raw() %>
I''ve submitted a small patch to make Rails behave properly with the
Erubis <%== %> construct. For some reason the current behaviour of
that tag in Rails 3 is to escape the contents _twice_ which is
probably a bug.
I offer three suggestions why this is a good idea:
- The syntax is cleaner. It can avoid a lot of .html_safe and raw in
your views. I especially like the conciseness of
2011 Apr 25
3
Active Record database time logging
I''ve been having a look through the code responsible for printing how
much time was spent in Active Record at the end of an action. My
reading of the code + experiments suggests that any database time
after the render is not counted.
It seems to me that in controller_runtime.rb in Active Record,
append_info_to_payload should in fact read
def append_info_to_payload(payload)
super
2005 Nov 30
3
How to do a rollback
Hi. I''d like to know how can i do a rollback after a
Table.new(params:id)?
thank you
--
Posted via http://www.ruby-forum.com/.