similar to: cannot convert Time into String

Displaying 20 results from an estimated 100000 matches similar to: "cannot convert Time into String"

2006 Mar 28
8
Problem connecting with an SQL Server 2000 database
Hi, I?m working on a rails application that uses data from an existing ms sqlserver 2000 database. Unfortunately I can?t get the connection to work properly. I used http://wiki.rubyonrails.com/rails/pages/HowtoConnectToMicrosoftSQLServer to make the connection. - Inserted the ado.rb - Changed my database.yml to development: adapter: sqlserver database: database_name host:
2006 Apr 24
3
TimeStamp conversion
Hi, I''ve got a TimeStamp field in MySql and want to use the hour and minutes in the value. for example: StartTime = Schedule.find(action2.ScheduleID).DateTimeStart.to_s That returns "Mon Feb 20 08:00:00 Romance Standard Time 2006" How do I get 08:00 returned ?? Thanks ! Steven. -- Posted via http://www.ruby-forum.com/.
2006 Aug 04
4
cannot convert String into Integer
Hi, I''m trying to implement a live search that supports searching for multiple words. So for example, if I type "ruby rails" in the search field, I would return results that have either the word "ruby" in them or the word "rails" in them. However, this is just a background as to what the following code is trying to do and might not even be needed to fix
2006 Apr 24
2
rails calendar system
Hi, Anyone got some tips on how to design some sort of datagrid/calendar where the columns define a resource and the rows define the date. In the corresponding cells are activities that match the resource and date, ... Thanks! Steven. -- Posted via http://www.ruby-forum.com/.
2007 Apr 10
5
newbie :: Convert integer to string in Ruby
Hi all, Please anybody tell me how to Convert integer to string in Ruby and concat it. Suppose I''ve a string "ABC" , I want to concat it with a number say "ABC12" . Please help me out. Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post
2006 Jun 01
4
can''t convert Fixnum into String ??
I have been getting this error message on various pages, just wondering if anyone could explain whats going wrong, and the best way to correct it code that is cuasing the problem is below @project = Project.find(:first, :conditions => "id = " + @purchaseorder.project_id) -- Posted via http://www.ruby-forum.com/.
2006 Apr 16
8
"Cannot convert String to Integer" after using association
So, I''ve written a partial that does some stuff with a given instance of my class "entity". Entity is ActiveRecord. I''m able to retrieve all sorts of data from an @entity, until I do something like: <% for @attribute in @entity.attributes %> <div id="attribute_<%= @attribute.id %>"> <%= render(:partial =>
2006 May 09
2
How do you Convert a Time or Date to SQL formatted date?
I am executing some arbitrary SQL in which i need to convert a date/time object into an sql formatted string. Is there a simple way to do this in rails? Thanks Chris -- Posted via http://www.ruby-forum.com/.
2010 Feb 18
5
Converting hash to option string
Is there a good way to programmatically convert {:a=>''b'', :c=>''d''} to ''a=b c=d'' ? Rails seems to do this knid of thing "all over the place". I see reverse_merge and similar functions ... but I wonder if this is canned behavior somewhere. -- Posted via http://www.ruby-forum.com/. -- You received this message because you
2006 Jan 11
0
error_messages_for >> Cannot convert Array into String
Hi all I have the following Model: Member(id, username, first_name, last_name, hashed_password, password_salt) Now I want to allow users to register for an account using the following form: --- <%= form_tag %> <%= error_messages_for ''member'' %> <p><%= _(''Username'') %>: <%= text_field(''member'',
2006 Mar 16
3
Passing function names from string variables
This may be a more generic Ruby question, so I''m going to ask on the Ruby forum, but I''m trying to figure out if there is a way to pass in the string value of a variable as the name of a method. For example, I would like to do something like: def sort_obj_by_uid(objects,@attr) @tmparray = Array.new @tmphash = Hash.new for object in @objects if !
2006 Apr 25
1
Array of dates/times from time.now till nextweek
Hi, I would like to make @dates in my controller. I tried the following: startdate = Time.now enddate = startdate.next_week for enddate > startdate @dates << startdate startdate = startdate.tomorrow end But I get an errormessage when I check the syntax: "warning: useless use of a variable in void context" Anyone? Thanks! Steven. -- Posted via
2010 Feb 03
3
to convert a character string in time
hi, I have my data time expressed in character string exple "5:20" (hour:min) and i want to convert these in times recognized by R. I have tried the POSIXct function: balise07$Hour <- as.POSXIct(balise07$Hour) but it didn't work. Do you know why? Do you know how i can convert my string character in a real time? Thanks Karine HEERAH Master 2 mention
2006 Jun 09
4
View into a String?
I''ve got a nice XML view of my data that works just fine when I call it from the browser. Now I''d like a different controller method to take that XML and write it to the file system. Since the XML view lives in an RXML file, is there a trick to telling the controller "Get your output into a string" instead of writing it back to the browser? After writing it out
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.
2006 Aug 03
2
Convert currency into number
1) A user enters $100 into a textfield and submits, I need to strip off the $ sign before it gets saved to the db. 2) The name of the field is "price", why does params[:price] upon submitting have nil value? -- Posted via http://www.ruby-forum.com/.
2009 Apr 12
2
Convert string to time
One variable contains values (1.30 - one hour and thirty minutes, 1.2 (which is supposed to be 1.20 - one hour and twenty minutes)). I would like to convert to a minute variable so 1.2 is converted to 80 minutes. How?
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:
2010 Mar 26
2
file upload error(can't convert Tempfile into String)
i tried a method to implementa file uploader by using amethod below this is ma controlller method to upload def save_imports Contactslist.save(params[:list]) render :text => "File uploaded successfully" this is ma view file .remote - form_for(@list, :url=> save_imports_list_path(@list, :format => "js"), :html => { :multipart => true,
2006 Aug 01
1
Getting nil when you want "" (a blank string)
This has got to be something obvious that I am missing... I have a remote form that has one value that is passed back to the server from a text field. The form has a set of parameters passed to the :url key called search_params. When the field is empty and the form is submitted, I get :my_val => "" as expected when I examine the log. All is well with the world. I need call that