similar to: has_many :through and form parameters

Displaying 20 results from an estimated 10000 matches similar to: "has_many :through and form parameters"

2006 Jun 08
3
RJS wierdness - Content div display js code
Hi, I have a link_to_remote name ''Show notes'', which calls an action that uses this RJS template: page.replace "notes_remote", :partial => "notes/hide_notes_link" page.insert_html :top, "notes_list", :template => "notes/list" page.visual_effect :highlight, ''notes_list'', :duration => 3 Works great. The
2006 May 30
1
Apache can''t load/require rubygems
Hi, I have rubygems installed in my home directory as I''d like to have control over gems without requiring root access. I''m trying to deploy a known working rails app on this machine but it falls down at the "require ''rubygems''" line in boot.rb. I have added the path to rubygems to LOAD_PATH in environment.rb; this is confirmed by dumping $: to a
2006 Jul 25
1
can''t dump: session wierdness
Hi, I have "include DRbUndumped" in one of my model classes. Whenever my app accesses the session I get the following: can''t dump /usr/lib/ruby/1.8/drb/drb.rb:395:in `_dump'' /usr/lib/ruby/1.8/pstore.rb:349:in `dump'' /usr/lib/ruby/1.8/pstore.rb:327:in `transaction'' /usr/lib/ruby/1.8/cgi/session/pstore.rb:90:in `update''
2006 Aug 24
0
"rake spec" doesn''t work after upgrade to 0.6.1
Hi: spec <files> works though. Stack trace: rake spec (in /home/jhughes/work/media-catalog/trunk) /usr/bin/ruby1.8 -Ilib /usr/lib/ruby/gems/1.8/gems/rspec-0.6.1/bin/spec "spec/models/category_spec.rb" "spec/models/item_spec.rb" /usr/lib/ruby/gems/1.8/gems/rspec-0.6.1/lib/spec.rb:1:in `require'': no such file to load -- spec/version (LoadError) from
2006 Jul 14
0
Can''t see local vars and method params in breakpointer
Hi, Is there a trick to being able to see local variables and method parameters at a breakpoint? I could swear this used to work, but now I get "NameError: undefined local variable or method" when I try and look at anything other than instance variables. jh -- James Hughes Web application developer Vancouver, BC "Developing a coherent political analysis is in many respects
2006 May 29
0
Non standard rubygems location
Hi, Page 183 of Programming Ruby, talking about the $: load path variable, states: "You can always add additional directories to this array from within your running program". So why can''t I do this in environment.rb: $:.concat(Dir["/home/jhughes/lib/ruby/site_ruby/1.8"]) # path points at my install of rubygems and then have require ''rubygems''
2006 Mar 10
0
auto_complete_field, :on_hide woes
Hi, I have auto_complete working generating a list and populating a text box in a form. The problem arises when I add the :on_hide option as follows: <%= auto_complete_field "search", { :url => {:action => "search"}, :on_hide => "foo($(''selected_uid''), $(''search_list''))"} > %> :on_hide makes everything stop
2006 Aug 25
4
Rake tasks fail silently, how to debug?
Hi, I''ve been using backgroundrb with some success up to now, but now when I do the start or setup tasks they just fail silently. Nothing in the log, no .pid file, and nothing in the process list. Rake with -trace just says, ** Invoke backgroundrb:setup (first_time) ** Execute backgroundrb:setup Any hints on how I can get more verbosity, or thoughts on what might be happening? (This
2006 Jul 19
1
Testing worker classes
Hi, Does it make sense to test a worker class by calling Middleman.new_worker? Or should I just be testing the functionality in the do_work method, with, say, a mock object. This seems like a really ugly DRY violation: you''d need to keep the code in the mock and the real worker in sync. That''s the philosophical half of my question. In fact, until someone tells me why I
2006 Jun 01
9
@model.errors.empty? => true; @model.valid? => false
Hi, So, how can the situation described in the subject come to be? In other words, what could be invalidating the model, yet not generating an error? thanks, jh ps. here''s the breakpoint session paste: irb(#<#<Class:0xb72eec00>:0xb72eeb10>):003:0> @project.errors.empty? => true irb(#<#<Class:0xb72eec00>:0xb72eeb10>):004:0> @project.valid? => false
2006 Jul 20
4
Plugins: svn externals vs. local repository
...or, what is the best practise for ensuring that capistrano gets plugin code to the production server? Do you hook up your plugins to the originating repository (thereby automatically picking up changes to the plugin), or check them into your application''s repo and use "script/plugin update" to keep plugins fresh? Does that method mess with your .svn directories? thanks for
2006 Jul 18
7
backgroundrb and autotest
Hi, First, thanks for the plugin. Sorry if this is not strictly a backgroundrb issue but I thought others on this list might have come across this problem. I''m trying to run the test that comes via the worker generator. The test works fine when running ''rake test_functional'', but when the tests are run by autotest I get "uninitialized constant BackgrounDRb"
2006 Aug 15
4
observe_form not serializing form
I want to use observe_form to automatically save notes in a text_area. This is the code I have: <form id=''notes_form''> <%= text_area :contact, :notes, :cols => 40, :rows => 10, :id =>''notes_text_area'' %> <%= observe_form(''notes_form'', :frequency => 1,
2009 Jul 15
0
has_many and has_one ... and nested form
Hiya I am looking at Rails 2.3.2 and how to cleanly do the following: - I have model User - User has many Plans - User has one Active Plan - New User form has fields on it to create the Active Parent I want to create a new User with an Active Plan in one form. At the moment I have: class User < ActiveRecord::Base has_one :active_plan, :class_name => ''Plan'',
2006 Mar 24
2
Change to has_many :through associations
Hi everyone. I''ve made a default change to has_many :through associations that I felt was important to make before they''re released. This is after some tickets and confusion I''ve seen regarding has_many :through. class Connection < ActiveRecord::Base belongs_to :user belongs_to :channel end class Channel < ActiveRecord::Base has_many :connections
2006 May 19
3
Ruby LDAP
Anyone has done work with Ruby-Ldap? and maybe could provide some examples? I have to admit that I am rather lost using this. I am looking to do a Rails interface to manage LDAP servers but I can''t seem to find how to do this in Ruby and for example retrieve the elements, attributes, and change them. This is what I have done so far.... --- #!/appl/ruby/bin/ruby -w require
2005 Dec 26
2
Dynamic order on has_many relationship?
I was wondering if it''s possible to some how control the :order given on a has_many depending on another attribute? Or do I need to just create multiple has_many relationships pointing to the same table but with different orders and then select which one I use in the controller instead? e.g class Category < AR::B has_many :products, :order => //something magical?// end
2007 Jan 05
1
(Enhancement?) for self referential has_many :through, w/ scoped create...
We have a User model and a Connection model which basically represents edges in a digraph (User to User, self-referenctial). Each of these edges can have a :connection_type which is currently just a char(1). has_many :friendships, :class_name => ''Connection'', :foreign_key => "source_user_id", :conditions =>
2006 Jun 08
3
has_many :through updates on delete.
I have a model that looks like this: class Actor < ActiveRecord::Base has_many :member_groups, :foreign_key => ''member_id'', :class_name => ''GroupMember'' has_many :groups, :through => :member_groups, :source => :group end class Group < Actor has_many :group_members, :foreign_key => ''group_id'',:dependent =>
2006 Aug 08
2
"include DRbUndumped" error
Hi, I am getting my hands on trying the cool BackgrounDrb plugin. Following various discussions and suggestsion, I included "include DRbUndumped" in my ActiveRecord model. However, the following exception occurs after I tried this and hit the page that uses this model. Does anyone know why this is so? Is it possible that an object cannot be DRbUndumped (that would mean, we