tag:ar-code.lighthouseapp.com,2007-06-20:/projects/3108-plugins/eventsar-code / Plugins Events2007-06-20T17:40:05Ztag:ar-code.lighthouseapp.com,2007-06-20:Event/15567702008-10-22T12:49:32-05:002008-10-22T12:49:32-05:00terence (at 6lines)Plugins: rer [#9]<div><p>ererer</p></div>tag:ar-code.lighthouseapp.com,2007-06-20:Event/6025452008-05-08T20:12:08-05:002008-05-08T20:12:08-05:00mattwestcottPlugins: Declaring acts_as_paranoid after a habtm association causes problems [#8]<div><p>
Just been bitten by this one myself. The reason AAP's destroy_with_callbacks fails to override habtm's definition is that AAP brings it in via an 'include'; this has lower priority than habtm's definition which is done inside a class_eval.
</p><p>
In any case, we wouldn't want to override destroy_with_callbacks at this point, because then we'd end up clobbering the habtm on-delete functionality. The method we really want to override is the one now known as destroy_without_habtm_shim_for_X, which is going to be tricky to pick out (especially as it might be buried under multiple habtm wrappers). I suspect the only way forward will be to monkey-patch the has_and_belongs_to_many function to make it expose the original destroy_with_callbacks with a predictable name. Still pondering my plan of attack there though.
</p></div>tag:ar-code.lighthouseapp.com,2007-06-20:Event/4566872008-03-31T05:47:32-05:002008-05-08T20:12:08-05:00Jon LeightonPlugins: Declaring acts_as_paranoid after a habtm association causes problems [#8]<div><p>
Best explained with an example:
</p></div>tag:ar-code.lighthouseapp.com,2007-06-20:Event/3294442008-02-02T18:02:39-06:002008-02-02T18:02:39-06:00RickPlugins: permalink-fu non-ascii tests [#6]<li>State changed from <em class="change">“new”</em> to <em class="change">“open”</em></li>
<div><p>
Please submit a patch that works on your system. It all works for me, so there's not much I can really do.
</p></div>tag:ar-code.lighthouseapp.com,2007-06-20:Event/3216482008-01-30T08:19:18-06:002008-01-30T08:19:18-06:00Diego AlgortaPlugins: [PATCH] Add only_deleted scope to acts_as_paranoid [#7]<div><p>
I also sent errtheblog a patch to fix will_paginate pages count to use count_with_deleted (and my count_only_deleted) when paginating find_with_deleted (or find_only_deleted).
</p><p>
<a href="http://err.lighthouseapp.com/projects/466-plugins/tickets/182-acts_as_paranoid-support-for-will_paginate">http://err.lighthouseapp.com/pro...</a>
</p></div>tag:ar-code.lighthouseapp.com,2007-06-20:Event/3216442008-01-30T08:17:14-06:002008-01-30T08:19:18-06:00Diego AlgortaPlugins: [PATCH] Add only_deleted scope to acts_as_paranoid [#7]<div><p>
Hi.
</p><p>
I sent this patch by email to technoweenie's gmail acount a few days ago with no answer. I did because the ar-paranoid project on rubyforge seems dead. So no value on posting the patch there.
</p><p>
So I'm posting it here hoping you can review and consider merging to the plugin branch.
</p><p>
This patch allows you to retrieve or count only the deleted rows of a model:
</p><p>
Widget.count_only_deleted
</p><p>
Widget.find_only_deleted
</p><p>
It has some tests. and doesn't break any previous tests.
</p></div>tag:ar-code.lighthouseapp.com,2007-06-20:Event/3190722008-01-29T10:13:19-06:002008-02-02T18:02:39-06:00joshua.allmannPlugins: permalink-fu non-ascii tests [#6]<div><p>
Tests are failing when permalink-fu tries to escape international characters. Other tests work fine. Not sure why this is, since PermalinkFu.escape(...) works fine if I test it from the console.
</p><p>
The same problem was reported here (<a href="http://ar-code.lighthouseapp.com/projects/34/tickets/131-test-cleanup-units">http://ar-code.lighthouseapp.com...</a>) and was fixed, but tests are still failing on my end.
</p><p>
Running ubuntu 7.10/ruby 1.8.4/rails 2.0.2
</p></div>tag:ar-code.lighthouseapp.com,2007-06-20:Event/3154262008-01-27T17:19:38-06:002008-01-27T17:19:38-06:00SudaraPlugins: pagination in exception logger [#2]<div><p>
ahoy.
</p><p>
Sorry for that. Maybe I'm on crack, but I needed it hanging out in production.rb - Not a biggie, but worth mentioning in that nice readme of yours.
</p><p>
Thanks
</p></div>tag:ar-code.lighthouseapp.com,2007-06-20:Event/3152442008-01-27T14:22:38-06:002008-01-27T14:22:38-06:00RickPlugins: pagination in exception logger [#2]<li>State changed from <em class="change">“new”</em> to <em class="change">“open”</em></li>
<div><p>
Hey, I guess I don't check this often enough. Chris Wanstrath made an <a href="http://github.com/defunkt/exception_logger/tree/master">enhancement to the plugin</a> that uses will_paginate. I plan on cherry picking that commit.
</p><p>
Sudara: where are you adding #protect_from_forgery? I'm not keen on adding it to the plugin if it'll break Rails 1.2 users.
</p></div>tag:ar-code.lighthouseapp.com,2007-06-20:Event/3072512008-01-23T10:32:05-06:002008-01-23T10:32:05-06:00SudaraPlugins: pagination in exception logger [#2]<div><p>
whups, one more thing:
</p><p>
the readme could also note that for most new apps (rails 2), you'll need to also include protect_from_forgery.
</p></div>tag:ar-code.lighthouseapp.com,2007-06-20:Event/3069772008-01-23T09:19:49-06:002008-01-23T09:19:49-06:00SudaraPlugins: pagination in exception logger [#2]<div><p>
Just want to add that those changes make it rails 2 friendly and working.
</p><p>
Only other thing to note is that it might help a few folks out to add the following route to the readme:
</p>
<pre><code class="ruby">map.logged_exceptions 'logged_exceptions/:action/:id', :controller => 'logged_exceptions'
</code></pre></div>tag:ar-code.lighthouseapp.com,2007-06-20:Event/2651262007-12-28T12:23:29-06:002007-12-28T12:23:29-06:00steve odomPlugins: pagination in exception logger [#2]<div><p>
Following up on what Schwab said above for using will_paginate, here's what I did:
</p><p>
I replaced line 34 in the logged_exceptions controller with:
</p>
<pre><code class="ruby">@exceptions = LoggedException.paginate :order => 'created_at desc', :page => params[:page], :per_page => 30,
:conditions => conditions.empty? ? nil : parameters.unshift(conditions * ' and ')
</code></pre>
<p>
And in the _exceptions.rhtml partial I replaced the 2 pagination divs at the top and bottom that look like this:
</p>
<pre><code class="ruby"><% if @exception_pages.page_count > 1 %>
<div class="pages pages-bottom">
Pages: <strong><%= pagination_remote_links @exception_pages, :params => { :action => :index } %></strong>
</div>
<% end %>
</code></pre>
<p>
With:
</p>
<pre><code class="ruby"><div class="pages pages-bottom">
Pages: <strong><%= will_paginate @exceptions -%></strong>
</div>
</code></pre></div>tag:ar-code.lighthouseapp.com,2007-06-20:Event/1290052007-09-27T08:01:10-05:002007-09-27T08:01:10-05:00Amir HelzerPlugins: active_record_context prevents object.reload from database [#5]<div><p>
When active_record_context is called in an around filter, object calls to .reload() don't actually go to the database. The objects get loaded from memory.
</p><p>
As a result, if optimistic locking is used, the transaction will keep failing indefinitely.
</p><p>
What I do is:
</p><p>
while !ok {
</p><p>
ok = object.save
</p><p>
if !ok
</p><p>
object1.reload
</p><p>
... reapply my changes to the objects ...
</p><p>
end
</p><p>
}
</p><p>
When active_record_context, this just fails forever as the stale object is never really refreshed from the database.
</p><p>
I've tried patching this, but it seems that my Ruby/Rails skills are not yet up to it...
</p></div>tag:ar-code.lighthouseapp.com,2007-06-20:Event/1181802007-09-19T16:48:51-05:002007-09-19T16:49:39-05:00SchwabPlugins: exc logged and notified [#4]<div><p>
it would be great if the exception logger could work in conjunction with the exception notifier, and if both could be configured to log and notify even errors that come from local addresses
</p></div>tag:ar-code.lighthouseapp.com,2007-06-20:Event/1181792007-09-19T16:47:25-05:002007-09-19T16:50:04-05:00SchwabPlugins: count options in paranoid [#3]<div><p>
to make acts_as_paranoid compatible with rails 2, the call to construct_count_options_from_legacy_args should be replaced with construct_count_options_from_args
</p></div>tag:ar-code.lighthouseapp.com,2007-06-20:Event/1181752007-09-19T16:45:39-05:002008-01-27T17:19:38-06:00SchwabPlugins: pagination in exception logger [#2]<div><p>
To make this compatible with rails 2, a new approach to pagination is needed. the classic_pagination plugin would probably work without changes. to use will_paginate I just had to make LoggedException the receiver for the call to paginate, and specify :page => params[:page] || 1, and remove the :logged_exceptions and :per_page parameters in the controller, and replace the pagination divs in the view.
</p></div>tag:ar-code.lighthouseapp.com,2007-06-20:Event/430932007-06-21T08:20:08-05:002007-07-12T09:53:41-05:00RickPlugins: multi-attribute for permalink-fu [#1]<li>State changed from <em class="change">“new”</em> to <em class="change">“resolved”</em></li>
<div><p>
Thanks! Committed as of <a href="http://bs.techno-weenie.net/!revision/2915">[2915]</a>
</p></div>tag:ar-code.lighthouseapp.com,2007-06-20:Event/424402007-06-20T12:40:05-05:002007-07-12T09:53:41-05:00Nick PlantePlugins: multi-attribute for permalink-fu [#1]<div><p>
has_permalink %w(first_name last_name stuff)
</p><p>
w/ tests
</p></div>