Hi guys,
I'm working on additions to what I submitted in ticket #3049
[http://dev.rubyonrails.org/ticket/3049]. Someone suggested that
redirect_to :back should allow for an alternate redirect if no referer
is set.
I've looked at the code for a while and allowing for:
redirect_to :back, :alter
Hi guys,
I really like RJS. I think they'll replace partials in alot of
instances. Unfortunately, because they're automatically used like
.rhtml and .rxml and are hard to specifically specify it makes it
messy to preserve fallbacks when using them. For instance, using
partials instead of rjs, my cr
I'm working on an application using sqlite locally and recently
noticed that checkboxes are evaluating to 1 and 0 (not true and false)
and thus aren't being sanitized to boolean values in the db ('t' and
'f' in sqlite). This isn't a problem in mysql because 1 and 0 are
synonymous to true and false,
call. Here's the method signature from the API docs
> (api.rubyonrails.com):
>
> check_box(object, method, options = {}, checked_value = "1",
> unchecked_value = "0")
>
> So you could replace the defaults of "1" and "0" with "t"
d_value = "1",
> > > unchecked_value = "0")
> > >
> > > So you could replace the defaults of "1" and "0" with "t" and "f",
> > > for example.
> > >
> > > Regards,
> > > David
>
uot;approved = ?",params["topic"]["approved"]],
"id = #{topic.id}"
+assert !Topic.find(:first, :conditions => ['id = ? and approved =
?', topic.id, true]).nil?
end
def test_class_level_destroy
On 12/21/05, Kevin Clark <[EMAIL PROTECTED]> w
o decide whether they need to be converted is
based on the column type, which in SQLiteAdapter::quote isn't always
passed.
On 12/21/05, Kevin Clark <[EMAIL PROTECTED]> wrote:
> After some hacking, I don't think this can be solved by writing
> SQLiteAdapter::quote. I did how
Hi guys,
I've been really frusterated with fixtures as of late. As wonderful as
migrations are (allowing me to develop, test and deploy on different
systems) being able to support multiple databases isn't nearly as cool
when my tests don't work on all the systems the codebase does due to
non db agn
Ok, looks like I was getting which db errs which way incorrectly. Date
definitely doesn't quote for SQLServer.. here's a snip of my test
code. Everything runs fine on sqlite and mysql (it handles the date).
ActiveRecord::StatementInvalid: DBI::DatabaseError: Execute
OLE error code:80040E07 in
Sure, I'll look into it ASAP.
Kev
On 1/5/06, Michael Koziarski <[EMAIL PROTECTED]> wrote:
> > foo:
> > id: 1
> > created_at: <%= 5.days.ago.to_s(:db) %>
> >
>
> This definitely works, and we use it throughout the strongspace
> fixtures. But ... yuck.
>
> Yaml has a format for dates and time
YAML for dates and times works already as long as the data is
formatted correctly (yaml dates are being used in the AR tests). There
were some bugs in the AR for SQLServer though so I've submitted a
patch (http://dev.rubyonrails.org/ticket/3406) for several of them.
Kev
On 1/5/06, Kevin
is called) should be included.
I've added my latest diff to the ticket
[http://dev.rubyonrails.org/ticket/3049] and included docs.
Kev
On 12/4/05, Kevin Clark <[EMAIL PROTECTED]> wrote:
> Hi guys,
> I'm working on additions to what I submitted in ticket #3049
> [http:/
> I wonder if some other method would work better? redirect_to :back
> sounds so un-english.
>
> Suggestions:
> redirect_to :previous, :controller =>
> 'alternative_controller', :action => 'alt_action'
> redirect_to :referring_url, :controller =>
> 'alternative_controller', :action => 'alt_action'
> :back should be considered a 5-letter version of
> request.env["HTTP_REFERER"] -- nothing more. And it's only there
> because request.env["HTTP_REFERER"] is hard to remember in the first
> place.
>
> Any additional logic, including safety features, should be delegated
> to a more advanced plugin
On 1/9/06, Michael Koziarski <[EMAIL PROTECTED]> wrote:
> The flip side of this, is that if we remove it, we break existing
> applications because on the off chance that an infinite redirect may
> occur.
I agree that redirect_to :back shouldn't be removed. Backwards
compatability is good. I just
Sorry guys, reply sent this to just Koz instead of this list... stupid gmail.
On 1/10/06, Kevin Clark <[EMAIL PROTECTED]> wrote:
> > If you can reliably detect that we have a problem, then no it's not a
> > big deal at all. In fact it's a great enhancement. But
If we're getting such persistance from this ip can we just ban it? If
the wiki is using the i2 code, I'd be happy to code up a patch to
allow it.
Kev
On 1/19/06, Justin Forder <[EMAIL PROTECTED]> wrote:
> Justin Forder wrote:
>
> > I've modified the Watir-based
> > solution to work from the Recent
Here's the line of code that is now the bane of my existance:
@topic_pages, @topics = paginate(:topics, :include => :posts,
:order => 'posts.created_at asc')
So, grab topics (eager loading the posts) and then order the topics
based on the post created date.
This doesn't work because when pagi
> Thanks,
> Jeremy
>
> [1] http://dev.rubyonrails.org/ticket/2597
> [2]
> http://wiki.rubyonrails.org/rails/pages/Count+Limit+Associations+Plugin
>
>
>
> On 1/25/06, Kevin Clark <[EMAIL PROTECTED]> wrote:
> >
> > Here's the line of code that is now
Hi guys,
I've got more info on ticket 3606
(http://dev.rubyonrails.org/ticket/3606) which refactors connections
to ActiveRecord from ActionPack. One of the obvious issues is that
because ActionPack is requiring fixtures from AR, when changes are
made in AR then tests may break in ActionPack. I'd li
n't have time for us. Those of us outside the core only have so much
we can do to help improve the situation (and trust me, we want to
help).
I would like to thank Jeremy Kemper for letting me pick his brain on
IRC. It was a great help.
Thanks for listening.
Kevin Clark
On 1/26/06, Kevin Clark
I've got a patch ready adding the pagination tests (and confirming the
bug with :include). It depends on ticket 3606
(http://dev.rubyonrails.org/ticket/3606) so I'll submit it as soon as
3606 is checked in.
Kev
On 1/25/06, Kevin Clark <[EMAIL PROTECTED]> wrote:
> Jeremy,
> So what do people think? Does ADO have advantages over ODBC I'm not
> aware of? Are there other reasons to keep ADO support in the adapter?
>
> Unless people have significant objections, I'll create a ticket and
> patch to deprecate ADO, and update the wiki instruction pages
> accordingly.
I d
Accidentally sent this just to Koz...
Also, I've been told that there is talk of refactoring Pagination all
together. I'm happy to take a shot at it. I tried to contact Sam on
IRC, but haven't received a response.
--
> In the meantime, I do have some questions about 3606. The use
Oh, additionally, I don't think the 37signals company breaks
instantiated fixtures as with my patch we're only loading ActionPack
fixtures. Unless there are other ActionPack database fixtures I don't
know about, I think we're ok.
Kev
On 1/29/06, Kevin Clark <[
Ok, my patch for ticket 3606 has been completely re-written. Now, if
you need to access ActiveRecord, you can do it by extending
ActiveRecordTestCase like so:
require 'active_record_unit'
require 'fixtures/post'
class PaginationTest < ActiveRecordTestCase
fixtures :posts
...
end
It allows fo
I just found a show stopper on this patch so I'll be making further
modifications, but feel free to chime in if you have an opinion on our
choice or the bug described previously.
Kev
On 1/30/06, Kevin Clark <[EMAIL PROTECTED]> wrote:
> Ok, my patch for ticket 3606 has been complet
;m beginning to think that the block syntax from before version 5 of
the patch may be the only way to make this work.
Kev
On 1/30/06, Kevin Clark <[EMAIL PROTECTED]> wrote:
> I just found a show stopper on this patch so I'll be making further
> modifications, but feel free to ch
Hi guys.
Apparently my complaints about lack of feedback didn't get any notice.
Funny that. Anyway, tests which isolate the pagination error have been
written for a long time. I'm still waiting on feedback or commital of
the ActiveRecord Helper thingy.. I don't think it'll work as a super
class of
> It's not clear to me whether the bottleneck is the time the core developers
> have available for reviewing patches, or simply the time required to merge
> acceptable patches.
>
> If the latter is the problem, as I suspect it is, perhaps the core team
> would be willing to solicit one or more non-
On 2/8/06, Rick Olson <[EMAIL PROTECTED]> wrote:
> > Which would include giving the "monkeys" complete access to the 37s
> > application code (because I think THIS is what all the patches get
> > tested against, I think). The problem is that there are tests which
> > are not included in Rails and a
I'll give it a shot. Is there a reason we can't load up the individual
schema to a db and use schema dumper? Clean up if needed?
Kev
On 2/9/06, David Heinemeier Hansson <[EMAIL PROTECTED]> wrote:
> I've started for a few new tests to use schema.rb instead of creating
> a gazillion changes to all t
Ok, yes, I'll take a look. Incidentally, does anyone know how to
resolve Rendezvous/Bonjour hostnames in Ruby? I tried using the DNSSD
library, but the resolve function doesn't seem to do anything at all.
Kev
On 2/9/06, Michael Koziarski <[EMAIL PROTECTED]> wrote:
> On 2
> Quite the opposite. Keep it up. You're kicking ass.
I agree completely. My post was all praise :)
Kev
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
Ernie,
I think it is great that you were able to modify ActiveRecord for you
needs. You might want to pull your changes into a plugin where others
could easily use your new code. That being said, I don't think
something like this would go well in core. Plugins were created
exactly for this situati
Daesan,
> > 2. This one is a bit more practical issue. Let's say I'm building a
> > public forum hosting service. (It is indeed something I have in
> > mind.) At some point, my site hosts 10,000 forums, each having its
> > own forum_id. Let's say each forum has average of 10,000 topics,
> > ea
On 2/20/06, Kyle Maxwell <[EMAIL PROTECTED]> wrote:
> What if, instead of a simple integer sequence, migrations used timestamps?
The problem is the dependence tree. If you do it with timestamps, by
inserting your own migrations you may change things later migrations
depend on. Similarly, we lose t
Fixture accessor methods don't work with set_table_name because the
class name can't be inferred from the table name. I've created a patch
which fixes this (http://dev.rubyonrails.org/ticket/3935).
Please take a look and throw suggestions my way.
Here's the current usage for a model Joke which us
Anyone have comments on ticket 3935
(http://dev.rubyonrails.org/ticket/3935) ? I think it should be in
1.1.
It allows for a set_fixture_class method in unit tests so table
accessor methods still work if your model uses a set_table_name call.
So for example (and from the unit tests):
model:
class
Fixed in changeset 3725 (http://dev.rubyonrails.org/changeset/3725)
On 3/1/06, James Adam <[EMAIL PROTECTED]> wrote:
> I just noticed that the assigns() method has been dropped from
> action_controller/test_process.rb
> (http://dev.rubyonrails.org/changeset/3724). Was this an oversight or
> is the
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 c
Never mind. Ticket is invalid. Fixtures don't hurt yet, lets leave em.
Kev
On 3/2/06, Kevin Clark <[EMAIL PROTECTED]> wrote:
> Ticket 4052 (http://dev.rubyonrails.org/ticket/4052) just came through
> trac, which introduces the need for a better way to access fixtures. I
&g
> The auto-migration feature is really nice in a non-scaffolding
> workflow, though. The way I use and work with a Rails application is
> by creating one model at the time as they're needed to make the
> application work.
I agree, this is a cool new feature, but I think it should be an
option rath
+1 to comment out socket
On 3/4/06, Keegan Quinn <[EMAIL PROTECTED]> wrote:
> On Sat, Mar 04, 2006 at 09:48:50AM -0700, Mike Clark wrote:
> > That is, setting a socket is the exception rather than the rule. For
> > most of the get-up-and-running apps I've seen, the socket isn't
> > necessary.
>
>
I like it better with classes as well. I'll test against my code at
work in the morning.
Additionally, Obie Fernandez recently posted about a different way of
reworking fixtures (http://jroller.com/page/obie/20060304) that we
might want to take a look at. Obie, if you're on the list, do you
want
I think it should raise. If you're calling render partial collection
with nil, there's a problem.. an empty collection ([]) should not
render anything, but nil should raise.
Kev
On 3/30/06, Francois Beausoleil <[EMAIL PROTECTED]> wrote:
> Hi !
>
> Quick question: what should ActionView::Base do w
I'll take it. I'll post on my blog about it tonight and get some sort
of todo list so we can track who's working on what docs/tests and try
to get sd.rb in on the action (best way to learn about it is to have
to write about it ;) ).
Kev
On 4/26/06, Scott Barron <[EMAIL PROTECTED]> wrote:
>
> On Ap
On 4/26/06, Josh Susser <[EMAIL PROTECTED]> wrote:
> That's great, Kevin. I'm happy to help out, just let me know if you
> need a hand with any of that. I have a little list of places where
> the docs need some work that I can dump into the todo list. You can
> email me off the list if you have
Oh, and on the test side the main trac is probably the way to go.
Maybe we should standardize "testing" as a tag for patches adding
tests/testing support?
Kev
On 4/26/06, Kevin Clark <[EMAIL PROTECTED]> wrote:
> On 4/26/06, Josh Susser <[EMAIL PROTECTED]> wrote:
>
&
6, Hampton <[EMAIL PROTECTED]> wrote:
> Hey man, I'm up for helping with the docs.
>
> My vote: RJS docs.
>
> Once you get a list up, make sure to pass the link out here.
>
> "Let's get it on!" (TM)
>
> -hampton.
>
>
> On 4/26/06, Kevin
Damn it.. that's add the 'docs' keyword to your patch.
Kev
On 4/26/06, Kevin Clark <[EMAIL PROTECTED]> wrote:
> Ok, the deal at this point is that when you have a doc patch, when you
> add the ticket make sure to add the 'docs' patch. It will then show up
Frederick,
Please tag your documentations patches with the 'docs' keyword and
make sure they have [PATCH] in front of them, and we'll take a look.
Thanks!
Kev
On 4/27/06, Frederick Ros <[EMAIL PROTECTED]> wrote:
> David Heinemeier Hansson wrote :
> | > I don't understand this blog post. The graph
> Wow ! That was quick ... As soon as I added the keyword you made it !
> Thanks a lot ... I'm going to see if I can add some documentation for
> methods that need some, beginning with some easy ones.
Awesome. Thanks for the patch.
Also, thanks to Marcel for helping get this stuff commited.
Kev
_
I believe I've seen it happen if you remove action_mailer and
active_web_services from the load in your environment.rb.. only if you
do both, not one or the other. If that's the case, it should really be
patched.
Kev
On 4/29/06, John W. Long <[EMAIL PROTECTED]> wrote:
I'm getting the following
Manfred,
In the future, please add the 'docs' keyword to documentation patches,
it helps us get them processed more quickly. Thanks for the patch.
Kev
On 5/9/06, Manfred Stienstra <[EMAIL PROTECTED]> wrote:
Hi All,
Because of Josh Susser's post a while back about "ganging up on tests
and docs"
It sounds like it could be useful. I'd say point us towards a plugin.
Kev
On 5/13/06, Hampton <[EMAIL PROTECTED]> wrote:
I wanted to hit the sonar button and see what the general reaction is to
this plugin I've created.
Basically the problem it solves is filtering with ActiveRecord.
Lets say w
Could it be a plugin?
On 5/23/06, Francois Beausoleil <[EMAIL PROTECTED]> wrote:
http://dev.rubyonrails.org/ticket/5167
Small patch that adds a new generator for observers. I never remember
what to inherit from when I want a new observer. That solves the
problem nicely and simply.
Didn't put
They're flooding the trac. Can Scriptaculous get a trac of its own or
can we direct non-patch enhancements to the spinoffs list and close
them? This is getting rediculous.
--
Kevin Clark
http://glu.ttono.us
___
Rails-core mailing list
Rails
+1 for no more enhancement tickets. If they want someone to do it,
mail one of the lists or do it themselves. Plugins over patches in
general. Bugs should still be filed.
Kev
http://glu.ttono.us
___
Rails-core mailing list
Rails-core@lists.rubyonrails.
-1 because with this you are manifesting that Rails IS perfect and
anyone who thinks the way it works should be upgraded has to either
make workarounds or create exceptionally breakable plugins that
override code.
I disagree. The problem is that the trac has been the place to ask for
everything
ely
belongs in core. That being said, most feature requests can be solved
with a plugin, and many of them should be resolved in that fashon.
That being said, I think it makes sense to only allow patches and
defects. Enhancements (which aren't patches) is just a wish list that
gets out of ha
I'm *definitely* not suggesting that we get rid of patches which
implement new functionality. Quite the opposite, I simply think all
enhancement requests should be in the form of a patch. Trac isn't
the place for discussing new features, this list is. We should try
and keep trac to a list
Precisely so. So why change a community, when you can change a (computer)
system?
We don't want to change the community, we want to change how the
community requests new features. Those sorts of requests shouldn't be
going through trac.
___
Rails-core
If you haven't seen it, I wrote an article in place of my weekly
guides asking my readers what they think about removing enhancements
and linking them to this thread. I've already got 7 comments this
morning, so it might be worth checking out.
http://glu.ttono.us/articles/2006/06/05/weigh-in-patc
enerators
tested right now? If I should have written tests, then how?
Thanks!
--be
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
--
Kevin
awaiting a patch?
- Rob
--
http://www.robsanheim.com
http://www.seekingalpha.com
http://www.ajaxian.com
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listi
can get a Postgres test server set up (unless there are some
> objections by people on the core list).
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
--
Kevin Clark
http://glu.tto
David,
If you'd like to setup every database and build a system that everyone
who does core development can rsync against, PDI.
Everyone on this list understands that broken code shouldn't be
checked in, but you're right, access is an issue. If you depend on
Oracle or DB2 or one of the other non-
echno-weenie.net
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
--
Kevin Clark
http://glu.ttono.us
___
Rails-core mailing list
Rails-core@lists.ruby
The things that are planned sound great. Expanding on Ryan's idea, I
think using deprecated methods should be considered an error. Once the
code goes in, I'd like to write a plugin that raises a deprecation
exception (when in the test environment) if deprecated methods are
used. I trust it's just
{ |v|
< ENV["RAILS_ENV"] = v
< RAILS_ENV.replace(v) if defined?(RAILS_ENV)
< }
I hate trac so much.
--
Kevin Clark
http://glu.ttono.us
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
You could always make it a plugin. Easy to use in your later projects
too that way. And if other people like it maybe it'll be right for
inclusion at that time.
--
Kevin Clark
http://glu.ttono.us
___
Rails-core mailing list
Rails
On 8/5/06, Blake Watters <[EMAIL PROTECTED]> wrote:
$13,000 in what, 24 hours? Holy balls, that's some serious response!
It's really more like 18 hours... :)
--
Kevin Clark
http://glu.ttono.us
___
Rails-core mailing
w this (or take it seriously).
--
Kevin Clark
http://glu.ttono.us
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
This is a doozy. See
http://glu.ttono.us/articles/2006/08/09/many-to-many-fixture-breakage
for more information.
Test and patch attached. Without the patch you get 500 some errors on
active record. Please please please fix this.
--
Kevin Clark
http://glu.ttono.us
many_to_many_fixtures.diff
I'm bumping this since I haven't seen teh fix go in.
On 7/29/06, Kevin Clark <[EMAIL PROTECTED]> wrote:
I just tried to file a ticket for these but trac is giving me errors
in the sql. Awesome.
Anyway, -d is broken for myself and a few others I've talked to. The
server st
27;})/) || base =~ %r{rails-[\d.]+/builtin}
end
else
$LOAD_PATH
--
Kent
---
http://www.datanoise.com
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
--
Is there a reason we don't just create a new subclass of
Test::Unit::TestCase called ControllerTest (or FunctionalTest) and
inheirit from that instead? We don't have to worry about the magic and
it's still backwards compatible.
--
Kevin Clark
http
Adding a default method is certainly less magic than guessing the
controller name.
--
Kevin Clark
http://glu.ttono.us
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
::Base
has_many :assignments
end
From this class declaration, Rails infers that there is an Assignment
model that contains the foreign key user_id. Isn't this the same kind
of "magic" we are talking about?
Kevin Clark wrote:
> See ActiveRecordTestCase in active_record_unit.rb in ac
80 matches
Mail list logo