search for: instance_methods

Displaying 20 results from an estimated 72 matches for "instance_methods".

2006 May 19
2
Problems at running Rails at the first time
...id so... :D So I took a tutorial to write a small app, but I fail in the step startig Rails with the command "rails myappdir". There are some warnings and error messages: first: /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/vendor/builder/blankslate.rb:26: warning: instance_methods: parameter will default to ''true'' as of 1.8.1 then 25 times: /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/vendor/builder/blankslate.rb:21: warning: instance_methods: parameter will default to ''true'' as of 1.8.1 then: /usr/lib/ruby/gems/1.8...
2007 Aug 18
0
RSpec and acts_as_attachment
...ser_file.should have(1).error_on(:size) @user_file.should have(1).error_on(:content_type) end # The spec fails with the following error # ============ should be invalid without file wrong number of arguments (0 for 1) vendor/plugins/acts_as_attachment/lib/technoweenie/acts_as_attachment/ instance_methods.rb:154 :in `content_type'' vendor/plugins/acts_as_attachment/lib/technoweenie/acts_as_attachment/ instance_methods.rb:154 :in `send'' vendor/plugins/acts_as_attachment/lib/technoweenie/acts_as_attachment/ instance_methods.rb:154 :in `attachment_attributes_valid?'' vendor/p...
2007 Jan 11
5
ASF: cannot determine document number from primary key
I''m getting this exception from acts_as_ferret: A RuntimeError occurred in search#similar: cannot determine document number from primary key: #<MyClass:0x9feba20> [RAILS_ROOT]/vendor/plugins/acts_as_ferret/lib/instance_methods.rb:132:in `document_number'' As a result of this call: object.more_like_this The relevant backtrace: [RAILS_ROOT]/vendor/plugins/acts_as_ferret/lib/instance_methods.rb:132:in `document_number'' [RAILS_ROOT]/vendor/plugins/acts_as_ferret/lib/more_like_this.rb:64:in `more_li...
2007 Mar 06
15
mocking missing methods
Hi folks. So I''m using mocha on a ruby project, and I really like it. One thing I''ve noticed is that it can be a bit "surprising" when I''m mocking methods that don''t exist on an object, and I think there''s an easyish fix. At the moment, you use sheep = mock() to create a mock sheep. What I''d like to do is something like sheep =
2006 Nov 28
4
Update/Create record only if field is true
I have a sellable flag in my database. I''m trying to have ferret only add/update records where sellable == true. What is the best way to do this? I''ve tried editing instance_methods.rb in the AAF, but I still can''t get it to work. Thanks for the help -- Posted via http://www.ruby-forum.com/.
2006 Jan 03
2
Newbie Install Question
...been trying to get rails going on one of our dedicated servers, with no luck. I have ruby installed, gems, etc... When i goto to create my first rails app i get this: rails test /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/ associations/association_proxy.rb:6: warning: instance_methods: parameter will default to ''true'' as of 1.8.1 /usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_view/vendor/ builder/blankslate.rb:26: warning: instance_methods: parameter will default to ''true'' as of 1.8.1 /usr/lib/ruby/gems/1.8/gems/actionpack-1.11....
2007 Jun 01
0
[1044] trunk/wxruby2: Special memory management for Wx::Grid
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!-- #msg dl { border: 1px #006 solid; background: #369; padding:
2006 May 05
11
Listing Actions
OK, call me crazy, but am I the first one to want to list out the actions that are available @ runtime? Anyone else come across this yet? Am I crazy? Well, yes, but... -- Posted via http://www.ruby-forum.com/.
2012 Sep 22
4
Class, Module, Object
>> reload! Reloading... => true >> puts Class < Module true => nil >> puts Module < Class false => nil >> puts Module < Object true => nil >> puts Object < Module false => nil >> Object.parent => Object The above indicates that the Class object instance inherits from the Module object instance and the Module object instance
2007 Apr 11
0
Fwd: [ mocha-Feature Requests-5856 ] Stubbing of private methods should be allowed
---------- Forwarded message ---------- From: noreply at rubyforge.org <noreply at rubyforge.org> Date: 11-Apr-2007 15:31 Subject: [ mocha-Feature Requests-5856 ] Stubbing of private methods should be allowed To: noreply at rubyforge.org Feature Requests item #5856, was opened at 2006-09-22 17:03 You can respond by visiting:
2005 Mar 09
21
Converting time retrieved from MySQL
I''m having a problem converting a date retrieved from my MySQL database and I''m hoping someone can help. MySQL stores the date/time as this: 2005-03-08 17:00:34.0 and according to my Pickaxe book Ruby stores times as "the number of seconds and microseconds since [...] January 1, 1970". All well and good. Unfortunately, RoR is converting my date to this:
2006 Jun 09
2
edit- view duality
Skipped content of type multipart/alternative-------------- next part -------------- *********************************************************************** Bear Stearns is not responsible for any recommendation, solicitation, offer or agreement or any information about any transaction, customer account or account activity contained in this communication. Bear Stearns does not provide tax,
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
2010 Nov 06
2
Custom File List for Rails 3 Spec Task
I have some javascript specs (using the jspec javascript framework) in my rails 3 project, living in the spec/javascript directory. How can I exclude the ruby files in the jspec project from being run when I run "rake spec"? RSpec::Core::RakeTask used to take a file list (which was usually generated with a glob pattern and an explicit call to Dir.glob). Now it only takes a glob
2008 May 28
3
Plug-in support for Camping Apps
# camping_plugin.rb # plug-in support for Camping Apps # require ''lib/camping_plugin'' # override R helper method to your liking :-) module Camping module PluginHelpers def R_with_module(c,*g) p,h=/\(.+?\)/,g.grep(Hash) g-=h raise "bad route" unless u = c.urls.find{|x| break x if x.scan(p).size == g.size &&
2006 Nov 28
8
how to update index from a script
Hello all, I''m using AAF right now to index my ~3million db records. However, any additions to these records are added to the database through an external script so the aaf activerecord hooks will not catch any updates. Since new records are only added rarely, I figured I could just add the new records manually in ferret from some type of script. I''ve been looking at the
2008 Mar 15
9
Spaces in Ruby on Rails and how to avoid them!
Hi, I just started learning ruby on rails and I am having hard time with white spacing! Here is the piece of code that will not work: validates_format_of :image_url, :with => %r{\.(gif|jpg|png)$}i, :message => "must be a URL for a GIF, JPG or PNG image" and here is the piece of code that will work: validates_format_of :image_url, :with => %r{\.(gif|jpg|png)$}i, :message
2012 Sep 08
4
dash symbol
In the example below, what is the dash doing between the class attribute and array: (field_helpers - [:label, :check_box, :radio_button, :fields_for, :hidden_field, :file_field]).each do |selector| -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2007 Oct 01
2
FileNotFoundError
...ib64/ruby/gems/1.8/gems/ferret-0.11.4/lib/ferret/index.rb:8:in `synchrolock'' /usr/lib64/ruby/gems/1.8/gems/ferret-0.11.4/lib/ferret/index.rb:267: in `<<'' /vendor/plugins/acts_as_ferret/lib/local_index.rb:152:in `<<'' /vendor/plugins/acts_as_ferret/lib/instance_methods.rb:73:in `ferret_create'' Thanks. Morten
2006 Mar 23
2
Way to iterate over each associtaion
Is there a way with ActiveRecord to get ahold of a collection containing each association? I want to write a rake task that will dump a model and all its related models to yaml. Thanks, Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060323/abdf4305/attachment.html