similar to: undefined method ... from `alias_method'

Displaying 20 results from an estimated 300 matches similar to: "undefined method ... from `alias_method'"

2006 Aug 10
1
acts_as_textiled
It''s nothing revolutionary. 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.
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'' ")
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 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,
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)
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 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 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
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
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
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
2006 Mar 12
1
alias_method interferes ApplicationHelper
Hello, I''m using Ruby 1.8.4 (darwinport), rails-1.0.0 (gem) , Powerbook / Mac OS X 10.4.5 , Webrick. How come Rails always raises NoMethodError for my helper (must_fill and rp or number_to_currency_rp) in application_helper.rb ? I doubt that alias_method is the culprit, but if i give # comment then there will be no errors at all ... :/ what am i doing wrong? is it a bug or stupid me? Thx
2008 Jan 18
2
NameError when using alias_method -- but method exists?
Hello Rubyists, I am a bit stumped here. I want to extend the ''load_file'' method in the YAML module. Following along with the PickAxe example of making old methods do new things, I try this in irb: >> module YAML >> alias_method :orig_load_f, :load_file >> def load_file(*args) >> contents = orig_load_f(*args) >>
2008 May 21
0
Problem with alias_method in a plugin
Hi, I''m doing my first plugin, based on attachment_fu structure. Here''s the code: http://pastie.caboo.se/200797. The problem is that the meta_tag method doesn''t seem to be overwritten. I can call model_instance.original_meta_tag and it return same thing as model_instance.meta_tag, so the aliasing works. I can call model_instance.foo and it correctly returns class of
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 an ecosystem surrounding it. That is, more plugins, widgets, locked-and-loaded
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?
2006 Jul 21
1
RedirectHandler? mongrel_rewrite?
Hey guys. I''ve been playing with RedirectHandler and it''s pretty neat, but I question its usefulness. At work we do the trendy "/javascripts/spy.1152734636.js"-style asset includes rather than the default Rails style of "/javascripts/spy.js? 1152734636". This is no problem with mod_rewrite as we run the basic Apache => Pen => Mongrel setup.
2006 Feb 01
7
Explanation of "alias_method"
Hi! I''m trying to extend ActiveRecord''s find method (Rails 1.0, Ruby 1.8.2), but I recognize a strange behaviour of the "alias_method" call. I wrote a very simple script to explain my problem: ------------------------------------------------------ module ActiveRecordExtension def self.included(base) base.extend(ClassMethods) base.class_eval do
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