search for: errtheblog

Displaying 20 results from an estimated 36 matches for "errtheblog".

2007 Dec 07
2
Pagination using will_paginate
Hi, I use will_paginate plugin to paginate the records in my view file.. I implement the same in 2 of my modules.. Its working fine in one module where i perform only the basic CRUD operation. In the other module i do have search option. This plugin behaves different for that method.. Normally if one click the page number links the request will be posted back to the same action or method
2006 Aug 10
1
acts_as_textiled
...nary. Just a plugin which lets you forget about the whole Textile to HTML render process. 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 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 Aug 15
1
Camping with Dr. Nic
Campers. Dr. Nic. The new migrations in Camping''s trunk are very nice. They also open the door (just an inch) to using Dr. Nic''s Magic Models with Camping. Here''s my stab at ''er: http://require.errtheblog.com/camping/blog.rb Run that against Camping trunk. Don''t forget to `sudo gem install dr_nic_magic_models`. The hackery is in Blog.create. Have to dance around Camping''s meta- ness and table prefix stuff. Anyone have a better / easier way of doing this? I tried a few di...
2007 Sep 10
1
Using Rspec with ScenarioFixtures
I am currently trying to get Rspec to work with ScenarioFixtures. http://code.google.com/p/fixture-scenarios/ http://errtheblog.com/post/7708 I did a quick search and didn''t find any mention that any one else had gotten this to work yet. If i missed something, could you please drop me a line. Otherwise, expect a progress report when i get this working... Bret -------------- next part -------------- An HTML attac...
2007 Aug 10
3
FixtureScenarios
This may have turned up in the RSS feeds of many of you already, but for those who haven''t seen it yet, looks intersting: <http://errtheblog.com/post/7708> > The main problem with fixtures, for me, has always been how unfun > they are. They literally suck the fun out of anything they?re > around. You throw them in your test/ directory, then suddenly > testing is, like, work. But it?s not work, dammit. This is Ruby,...
2007 Oct 01
1
Pagination should be in the official plugin repository
Now that Rails has gone on a diet and components have been moved out of core and into plugins, it seems that Classic Pagination should also be in the official Rails plugin repository. Currently, it''s at svn://errtheblog.com/svn/plugins/classic_pagination. It seems inconsistent that, unlike acts_as_list, acts_as_tree, etc., pagination should reside at a separate location. This makes it difficult for people upgrading to Rails 2.0 who need to install it for compatibility. I''m suggesting it be moved t...
2007 Oct 16
10
Scenarios Plugin Pre-Announcement
This is sort of a pre-announcement for a Rails plugin my friend Adam Williams and I are working on. We''re in the process of extracting it from a project we are working on so that it can be generally useful to the Rails community. We are calling it "Scenarios". It is a drop in replacement for Rails fixtures: http://faithfulcode.rubyforge.org/svn/plugins/trunk/scenarios/README
2008 Jan 14
13
prototype/script.aculo.us ecosystem
Recently errtheblog (http://errtheblog.com/) put up a nice post about jQuery. Putting aside all the assertions about cleaner code and fewer lines of code than with Prototype, the one thing that struck me from his (and others'') writing and from direct inspection is this: jQuery seems to have a more of...
2006 Nov 13
5
apache -> pen -> mongrel cluster
Hi everyone, Recently, I''ve been reading about different deployment environments for rails and mongrel. One configuration I''ve started seeing is apache -> pen -> mongrel cluster. See http://errtheblog.com/post/35 as an example. Can someone explain to me the benefit of using Apache and Pen as opposed to either using apache as a load balancer or pen by itself? Thanks, Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel...
2008 Feb 17
1
Strange bug using runt with rails
...a few ways of doing this. I''ve tried installing runt using ''gem install runt'' and then trying to do "require ''runt''" in my environment.rb, and I''ve also tried using the ''vendor everything'' method (described at http://errtheblog.com/posts/50-vendor-everything). In both cases, when I put "require ''runt''" into my environment.rb file, start up webrick, and try to load a page from my app in the browser, the ruby process jumps up to 100%, the page never loads, and I have to kill the server. I get n...
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",
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'' ")
2008 Apr 16
12
how to accomplish pagination in RoR
Hi Folks, I am just trying to get started up in RoR, I have done a simple application of add, edit, delete.... I am now trying to accomplish pagination in RoR, I referred a few tutorials, however none of the examples that i tried from there, seemed to work error free..... I have heard that lots of things have deprecated in RoR, can someone please post me a detailed report of how i can
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 Aug 23
0
emdash vs <del>
...amp;#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 03
1
Common query conditions
Everytime I invoke MyModel.find I need to use the same :conditions. I don''t want to repeat it always. So, how can I do for an automatic-addition of a where clause ? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to
2008 Mar 07
0
Vendor Everything & Rake
We are considering moving our app to a "vendor everything" model: http://errtheblog.com/posts/50-vendor-everything I''m able to get the application to work fine this way, but, rake tasks don''t work unless I have the gems installed. Some of our rake tasks use the same libraries that the app does. What I''d like is a way to do "vendor everything"...
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.
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 =>