search for: wanstrath

Displaying 18 results from an estimated 18 matches for "wanstrath".

2006 Aug 10
1
acts_as_textiled
...rocess. Once you tell your model which fields should acts_as_textiled (and as long as you''re using form_for for your text entry) it Just Works. No DB changes or whatnot. Here''s the skivvy: http://errtheblog.com/post/14 Tips and tricks in that post and README. Enjoy. -- Chris Wanstrath http://errtheblog.com
2007 May 27
3
Stripping out textile markup
Hi, I have several hundred pages of text, all carefully marked up with textile, which I use redcloth to convert to html for display. Now I find I need all these pages to alternatively output plain text - ie. A-Za-z0-9 and simple punctuation only. Any suggestions on the best way to do this? My only thought is to let redcloth do its stuff, and then strip out the html tags - but it feels wrong.
2006 Oct 22
3
Keeping DRY - I like a simple life!
Hi, I''m new to Ruby and Rails and I would be very grateful for some advice. I''ve got the following code. class Foo < ActiveRecord::Base include Versionable # Some methods to handle my versioned objects has_many :versions, :class_name => "FooVersion", :foreign_key => "parent_id" belongs_to :curr, :class_name => "FooVersion",
2006 Aug 13
3
+ migrations in camping
Camping apps are supposed to be little independent apps, often contained in a single file, which create the database tables and manage them without hassle. These days it''s common to see in a Camping app: module Tepee::Models def self.schema(&block) @@schema = block if block_given? @@schema end end Tepee::Models.schema do create_table :tepee_pages,
2007 Jan 16
4
question about sessions and code re-use
hey there, i have a simple model called key_words.rb the purpose of this is to hold system config data. it also holds the parameters that our system uses to judge the condition of the stuff we monitor. anyway, one of the methods is this def self.get_in_wet_list(status) wet_list = find(:first, :conditions => "name = ''wet_list'' ")
2006 Aug 15
1
Camping with Dr. Nic
...ce around Camping''s meta- ness and table prefix stuff. Anyone have a better / easier way of doing this? I tried a few different approaches but kept coming back to this one -- the brute force. Either way, it works. Maybe this is a candidate for Equipment, Jonas? Enjoy. -- Chris Wanstrath http://errtheblog.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/camping-list/attachments/20060814/1eac798d/attachment.html
2007 Feb 26
2
undefined method ... from `alias_method'
0 wicked var/www % ./script/console Loading development environment. >> r = Recipe.find :first NameError: undefined method `recipe_type='' for class `Recipe'' from ./script/../config/../config/../app/models/recipe.rb: 101:in `alias_method'' In recipes_controller: alias_method :orig_recipe_type=, :recipe_type= def recipe_type=(t) if t.nil?
2006 Jul 21
1
RedirectHandler? mongrel_rewrite?
...p my RedirectHandlers wrong? I''d like to do things the Official way, so any help on the RedirectHandler would be appreciated. Thanks. In case anyone wants check this plugin out, it''s really similar to the RedirectHandler: - http://code.ozmm.org/rewrite/ --- - [ chris wanstrath, chris at ozmm.org ] - [ http://ozmm.org ] -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060720/7e2cdacd/attachment.html
2006 Aug 10
6
Multiple sites using one data source
Hi, Just wondering if anyone has any suggestions as to the best way to provide access to the same data source for the (possible) creation of multiple web sites. I figure my options are: - Direct database access over tcp - ActionWebService - Wait for ActionResource I''ve done up some work with ActionWebService already, but I don''t think it''s going to work because it
2006 Aug 13
1
establish_connection method
I''m digging into rails source code. But I''ve got a problem in undestading actionrecord::base source code which is connection_specification.rb. In the body of establish_connection method, def self.establish_connection(spec = nil) case spec when nil raise AdapterNotSpecified unless defined? RAILS_ENV establish_connection(RAILS_ENV)
2006 Mar 02
0
March Ruby events in the SF Bay Area
Sadly, no South Bay Ruby events have been announced. C''mon, guys, make something happen... 3/14 6:00 pm Beginner''s Presentation - Chris Wanstrath will write a Ruby time server and discuss the code, to compliment Barce''s time server query script [from the Feb. meeting]. Chris says: "Nothing complicated, another simple beginner presentation." 7:00 pm...
2009 Oct 02
0
[PATCH] configurator: update some migration examples
...sed to incrementally migrate off the old code base without hitting a thundering herd (especially in the "preload_app false") case. Also comment on the per-worker listen usage in the RDoc, not just a hidden comment. --- I just pushed this out earlier, this example was inspired by Chris Wanstrath''s before_fork hook but modified to use SIGTTOU instead of SIGQUIT for all but the last worker to minimize memory explosions during upgrades. The :tries and :delay options were also inspired by Chris and will be in v0.93.0 which will probably be released. lib/unicorn/configurator.rb...
2006 Aug 23
0
emdash vs <del>
...;p>First part&#8212;middle part&#8212;end part.</p>" (No space after ''First part'') That''s a little less natural for the non-techies who will be entering Textile data on my site. Is this a known issue, or is RedCloth correct? Thanks. -- Chris Wanstrath http://errtheblog.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/redcloth-upwards/attachments/20060822/e33c15db/attachment.html
2007 Jan 16
1
Can't pass parameters to Ziya controller using url_for
Hi All, I''m stuck yet again. I have an action on a controller that produces a Ziya graph, which I call using the gen_chart() helper. However, I can''t seem to pass more than one parameter through to the action. <%= gen_chart( "overview_graph", url_for( :controller => ''graph'', :action => ''graph'', :graph_id =>
2006 Jun 30
50
Time To Pick the Mongrel BUGS Mascot!
Bradley Taylor shot me this *goldmine* of ugly ugly ugly dogs: http://www.sonoma-marinfair.org/uglydogvote.shtml I *have* to use one of these for the Mongrel BUGS Mascot. He''ll go on our bug list page and replace the little beetles on the left. Pick the dog you think best represents a lovable but defective pooch and reply to this with your +1. Let the voting begin! -- Zed A. Shaw
2007 Mar 19
24
alias method spec?
I am completely baffled by this one - My guess is that there is no pure ruby way to do this - but how could I set up a spec to test that one method is an alias of another? Thanks for any help, Scott
2006 Nov 14
11
RESTful mixin, mixin repo?
Hi, I just put together a little mixin to provide pseudo-RESTful services in camping apps. Basically, it looks for a hidden _verb field in form posts, and sets the @method to the supplied value (e.g. put or delete - which browsers don''t support). This lets you define put and delete methods in your controllers. Groovy. Code: http://pastie.caboo.se/22613 Is there any permanent repo of
2007 May 04
22
CampingConf?
Campers -- In a few weeks there will be a bunch of people in Portland, OR, for a conference. A long time ago some campers mentioned that might be a good time for us to get together and hold a mini CampingConf for a few hours. Is anyone interested? Does anyone want to organize it? I''m thinking Wednesday night, May 16. We could possibly get a spot at FreeGeek (not likely since they are