search for: lunaclaire

Displaying 9 results from an estimated 9 matches for "lunaclaire".

2009 Nov 30
6
rails 2.2.3 dirty.rb field_changed? method throwing arg error on creating an obj
I have a new model I''ve just built. It''s associated with another model via has_many. I''m trying to create one of these obj''s for the first time and I keep getting an Argument Error as follows: ArgumentError (wrong number of arguments (3 for 0)): C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/ active_record/dirty.rb:135:in `field_changed?''
2008 Jul 26
4
simple_format, (long) urls, and wrapping
I''m using simple_format to format and display posted content from users. This content sometimes has urls in it. The problem I''m having is that if the urls are long enough to wrap, they do, but the url gets split with a <br> tag. Then, if the user clicks on the link, only the first, non-wrapped part of the link gets posted to the browser... and that''s an invalid
2009 Nov 26
15
bad move? - complex form with *many* observe_field's
I have a pretty complex form with many text fields and a number of selects. We let the user add multiple types of associated objects to the parent object and to edit the values for those associated objs, so the form can have something like the following number of fields on the page: 9 text fields + 3 selects + a*(1 text + 1 select) + b*(1 text + 1 select) + c*(1 text + 1 select) + d*(1 text +
2008 Dec 13
3
how to do "special queries" ala The Rails Way on "associated" conditions?
I have the following in a model class: class Game < ActiveRecord::Base has_many :player_stats has_many :players, :through => :player_stats def visitor_stats stats = [] player_stats.each do |stat| stats << stat if stat.player.team.team_code == self.visiting_team_code end stats end def home_stats stats = [] player_stats.each do |stat| stats << stat if
2010 Jan 27
2
has_many, through with nested models?
First the data model: class Forum < ActiveRecord::Base has_many :topics, :dependent => :destroy, :order => ''created_at desc'' end class User < ActiveRecord::Base has_many :topics, :dependent => :destroy has_many :comments, :dependent => :destroy has_many :replies, :dependent => :destroy end class Topic < ActiveRecord::Base belongs_to
2010 Sep 17
1
using OpenPGP gem and getting "out of range error"
I''ve been handed someone else''s code to debug, but am getting no further than he did... perhaps someone can help. We''re using the OpenPGP gem (http://openpgp.rubyforge.org/) to PGP- encrypt an XML file for submission to a third-party for processing. The prob is that when encrypting, we get errors like the following: RangeError: 1502 out of char range from
2008 Jan 30
0
prob linking to static page in public folder
For the first time, I''m trying to link to a static page and running into a problem... Here''s the link_to code: <%= link_to "Terms of Service", ''/terms_of_service.pdf'', :popup => true %> And here''s the error I''m getting: no route found to match "/terms_of_service.pdf" with {:method=>:get} Should be simple and
2009 Aug 13
0
Paperclip - gen'd thumbnails are fin in dev, but blurry in production
Seems I''ve seen some discussion in the past about something not right on the server side with ImageMagick when this is happening, but I cant find it now that I''m having the problem. Any advice?
2008 Mar 14
2
MySQL IN clause for an array of strings
I''m trying (for the first time) to build an IN clause from an array of strings and getting an error using MySQL as the DB... Here''s the code I''m using to build the clause: zips_clause = '''' user.get_zipcodes.each {|z| zips_clause += '','' if !zips_clause.blank? zips_clause += ''\'''' + z +