similar to: Getting nil when you want "" (a blank string)

Displaying 20 results from an estimated 6000 matches similar to: "Getting nil when you want "" (a blank string)"

2006 Jul 28
2
Delete has_many_and_belongs_to_many relation
Hi there, Just a simple question I guess, but I am unable to find an anwser... How to delete a hmabtm relation? Any help will be appreciated :) Thanks, Fabrice. -- Posted via http://www.ruby-forum.com/.
2006 Aug 12
5
In place editing on a list - not passing ID through
I want to do in-place edits on a list of data, but I''m having trouble getting the ID passed through to the controller. I use this in my view to create the field: <% for frame in @frames %> ... <%= in_place_editor_field :frame, :price %> <% end %> and this produces the following in my output: <span class="in_place_editor_field"
2006 Jul 31
2
ambiguous column name in has_many :through
In my application model I have three classes: Accounts, Projects, and Items class Accounts < ActiveRecord::Base has_many :items, :through => :projects, :source => :items has_many :late_items, :class_name => ''Item'', :through => :projects, :conditions => [''due_on < ?'', Time.now], :source => :items end class Projects <
2006 Jul 27
7
''remember me'' using cookies
I''m about to implement this, and I''m thinking of storing the user''s id and their hashed password in the cookie after a successful authentication. can any see an obvious security issue with this? I know the method is vulnerable to cookie theft but am i missing anything? thanks alan
2006 Jul 31
7
Problem with routes when I move the app to a different machine
Hi all: I have an application that runs great on my macbook pro, however, when I move the app to the production linux box, all routes fail except for the one I set up as the default: map.connect '':controller/:action/:id'', :controller => "Employee", :action => "status" I made sure the shebang line in dispatch.* was set to be OS independent
2006 Jul 28
6
STRFTIME() why is it not defined
I am trying to take the input from a field in wich the user enters a date, and formatting it to my time format if params[:gotcha] != '''' gotc = params[:date].to_a gotc.strftime("%m/%d/%y") end Yet I get this error: NoMethodError in AddController#add undefined method `strftime? for ["00000"] What''s wrong. I''m positive this method is
2006 Jul 31
2
RJS: hide element problem
Hi, I am trying to hide a "intro" text shown to user the first time after he has made a search, in the website with RJS/Prototype "hide". I get the following error: RJS Error: Type Error: element has no properties. The text I would like to hide is in a div called "intro" and in my RJS I tried: - page.hide[:intro] as well as - page.hide ''intro''
2006 Jul 28
2
change url based on account name
Hi, Is this possible Can I specify a url ie http://localhost/AccountName/:contorller/:action/:id Where AccountName is should be a userName, which will lookup a siteId in the database? Whats the best way of going about this, is there somthing in the routes.rb file I can change to get the account name into a variable? Thanks for your help jon -- Posted via http://www.ruby-forum.com/.
2006 Jul 28
4
add one month or one year to a date
Hi, I need to be able to add one month or in some cases on eyear to a Date. Does anyone know of any easy ways of doing this? thanks scott -- Posted via http://www.ruby-forum.com/.
2006 Mar 18
3
Nil result on find & pretty print
I am new to Ruby and to Ruby on Rails and have spent the last few days trying to get my head around it. I think I am already hooked but am suffering badly from years of programming a non-OO RDBMS. I am trying to learn by attempting to produce a system for my work. I have a main table sdocs which has a field supplier_id which is an entry in another table (suppliers) to lookup supplier name etc.
2008 Mar 20
4
Blank DateTime versus Nil DateTime
Hi! These days I have been having trouble with a test that tried to test DateTime functionality. I have discovered that a NULL DateTime is auto-type casted to NIL by Rails. My problem here is that I have a field :datetime and I want to allow NULL datetimes but not wrong datetimes. With this validation if deadline is wrong or if is is blank it returns true. How I can accomplish this? protected def
2006 Aug 10
6
Getting started w/ Ruby on Rails
Hi, I would like to get started with RoR, since it seems to be a terriffic platform for Webdevelopment. However, I''m unsure what "level" you need to be on in terms of programming to get started? Best regards, Gustav -- Posted via http://www.ruby-forum.com/.
2015 Sep 21
3
New software based on libvirt
Hello, I'm introducing to you the decentralized cloud Cherrypop. Combining libvirt and LizardFS (as of now) it becomes a cloud completely without masters. Thus, any node is sufficient for the cloud to be up and therefore no wasted resources and no single point of failure. It's still pretty crude software but will work with some tinkering. Hope you try it and like it! For more
2013 Feb 17
3
Select components of a list
Hi Gustav, Try this: lapply(1:length(models),function(i) lapply(models[[i]],function(x) summary(x)$coef[2,]))[[1]] #1st list component [[1]] #??? Estimate?? Std. Error????? z value???? Pr(>|z|) # pm10 #5.999185e-04 1.486195e-04 4.036606e+00 5.423004e-05 #[[2]] #??? Estimate?? Std. Error????? z value???? Pr(>|z|) #ozone #0.0010117294 0.0003792739 2.6675428048 0.0076408155 #[[3]] #???
2006 Jul 31
3
getting the last four digits of a string or number
I want to trim down a phone number to the last four digits before saving it to the db. How would I do this? For example, 800-555-1212 which could also be 8005551212, i want to save just 1212 (last four digits) only. -- Posted via http://www.ruby-forum.com/.
2006 Mar 14
3
Check whether externam URL is valid?
Hey, I have users entering URLs into my app, is there anyway in which I can check to see if the URLs actually point to something before saving the user input? Maybe a kind of ''ping''-action that returns true on success? (btw: does anyone of a tentative release date for Rails1.1? I''ve been slobbering all over my RailsRecipes book and I can''t wait! Also, Scott
2019 Jan 13
2
Samba 4 users - UID/GID - or how to migrate
Hello, I try to migrate my old SAMBA Installation to a new Installation. SAMBA is running. But my Windows users can see the shares but cannot open Files. My old Installation /etc/samba/smb.con ...        workgroup = DUCK         server string = %h server (Samba, Ubuntu)         interfaces = eth0 192.168.1.200/255.255.255.0 localhost         bind interfaces only = Yes         security =
2005 Nov 24
1
Autocompleting combobox: fact or fiction?
Hey, I''ve got a script.aculo.us autocompleting textfield that works wonderfully, but how do I make the value of the selected option submit with the form...for that matter, do autocompleting textboxes have ''option'' tags, or is what I want to do simply impossible 8[ Thanks, Gustav gustav-Y7mMFpLgOV2wB/GGPSRsq0B+6BGkLq7r@public.gmane.org -- Posted via
2012 Oct 05
1
Puppet Dashboard inventory search problems.
I''m using Dashboard 1.2.10 on an Ubuntu 10.04 LTS system, and Puppet 2.7.19 When I do an inventory search, I get a blank screen. In the logs, I found the following: Processing NodesController#search (for X.X.X.X at 2012-10-05 08:44:57) [GET] Parameters: {"action"=>"search", "controller"=>"nodes",
2001 Sep 25
2
problems with msdfs
We did some tests with msdfs on HP/UX with samba version 2.2.1.a and we found a strange problem. We create a msdfs root on a HP/UX system with samba version 2.2.1.a and create a link in it to an HP/UX system with samba version 2.0.7. We mapped the link in the msdfs root on a NT4 system to drive F. The share contains the source of samba and in explorer we went to :