similar to: @model.errors.empty? => true; @model.valid? => false

Displaying 20 results from an estimated 7000 matches similar to: "@model.errors.empty? => true; @model.valid? => false"

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,
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 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 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 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 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
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
2006 Aug 03
3
undefined method `'' for #<DRb::DRbUnknown:0x2501bd4>
I tried installing BackgrounDRb today. Followed the readme, made a little worker for myself and executed it within the code. But I keep getting this error. I must''ve gone over the README a zillion times. Any idea what it is? undefined method `[]'' for #<DRb::DRbUnknown:0x2501bd4>
2006 Aug 15
6
Theoretical: Should models be subclasses of AR or mix it in?
All, My apologies if this is a little long-winded and stream of consciousness-y :). SUMMARY: Why do we extend ActiveRecord instead of mixing it in to our model classes? Been thinking about my app''s models and starting to want to build something of a hierarchy. I have some commonality across 3 of my model classes and I''d liek to aggregate the behavior in a superclass.
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 Jul 21
0
has_many :through and form parameters
Hi, The standard setup: class Task: has_many :studies, :class_name => "Study" has_many :datasets, :through => "studies" class Dataset: has_many :studies has_many :tasks, :through => ''studies'' class Study: belongs_to :task belongs_to :dataset Now, if I have an edit view for my Task, is it possible to set up the form so that in the
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 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
2007 Jan 29
5
Getting the reason why this fails ??
Hi there. Have this code, and i need to find put why it fails. >>Controller ------------ def update @user = User.find(@params[:id]) if @user.update_attributes(@params[:user]) flash[:notice] = ''The user was successfully updated.'' redirect_to :action => ''show'', :id => @user else flash[:notice] = "Error: The user
2006 Apr 25
16
case statements in views...strange error on OSX
I have a simple case statement in one of my views. This works fine on my windows machine. Move to the mac and I get: "parse error, unexpected tIDENTIFIER, expecting kWHEN". I have not changed anything but cannot resolve the issue. my view has this in it (simplified for test) <% case controller.controller_name -%> <% when "accounts" -%> <h3>worked
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
2020 Oct 16
2
Customized theme for Syslinux.cfg
Thank you Gregory your code worked to remove the border in syslinux! It wasn?t the Alpha (that changes the opacity of the border color), but it was the ?shadowing? that had to be changed, so ?none? in the shadowing column worked(you notice the border come back if you change ?none? to ?std?) reference this link for terms: https://wiki.syslinux.org/wiki/index.php?title=Menu#MENU_COLOR ! I am also