search for: date_created

Displaying 11 results from an estimated 11 matches for "date_created".

2006 Feb 23
2
find_by_sql aliasing issue when accessing attributes
I was recently having problems accessing attributes in an object. Can somebody explain to me why this is, and if it is a bug? I have the following code: @archives = RapturePost.find_by_sql "select distinct date_format(rapture_posts.date_created,''%Y-%m'') date_created from rapture_posts where rapture_posts.site_id = 1 order by rapture_posts.date_created desc" I wish to loop through the contents of the object with the following: for archive in archives #do something with the contents of archive end Whenever I try...
2006 Feb 22
2
accessing an attribute within an embedded object
When I dump an instance variable to the web browser using object.inspect I get the following: This: <%= debug archive.inspect %> Yields this: #<RapturePost:0x2aaaacada118 @attributes={\"date_created\"=>\"2006-02\"}>" How do I access that date created value? Neither of the following work. The don''t give me the actual date value, only nil or blank. archive.date_created archive.attributes.date_created Any suggestions? michael -- Posted via http://www.rub...
2006 Jan 19
0
file_column error: tmp file created but not actual
...llpaper] StudioController: missing default helper path studio_helper Processing StudioController#create_wallpaper (for 64.166.12.169 at 2006-01-18 23:20:34) [POST] Parameters: {"commit"=>"Create", "wallpaper"=>{"downloads"=>"0", "date_created"=>"Wed Jan 18 23:20:12 PST 2006", "price"=>"0.0", "title"=>"test logger4", "date_available(1i)"=>"2006", "image_temp"=>"", "date_available(2i)"=>"1", "descriptio...
2006 Jun 12
3
Default value for model var
I know this has got to be a really dumb question, but here goes anyway. I''ve got a model with an associated table. One of the columns in the table is ''date_created'', which I want to be set to the date/time each row was added to the table. Seems to me that setting this in the initialize method for the model would be the right thing to do,... class MyThing < ActiveRecord::Base def initialize @date_created = DateTime.now end ... But that t...
2006 Jun 13
9
Find DB items by "title"
I''m having trouble finding then displaying all items in my "posts" table that match a certain search string. I have a from field: <%= start_form_tag :action=> "search" %> <div title="Search" id="searchform" class="form"> <h3>Search</h3> <%= error_messages_for ''post''
2006 May 09
7
going crazy!!!!!! ActiveRecord::StatementInvalid in Project
...g this error. ActiveRecord::StatementInvalid in ProjectsController#create Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' , , , , )'' at line 1: INSERT INTO projects (`name`, `date_created`, `quote_id`, `client_id`, `description`, `user_id`) VALUES(, , , , , ) all seem sto go wrong when I call if @project.save however when I change belongs_to :quote to belongs_to :quotes (extra s on the end) Everything seems to work here as expected. any suggestions why thi sis happening? --...
2019 Feb 14
1
Proposed function file.backup
Dear R Core: In the kutils package, I wrote a function that is so handy that I would like to ask you put it in R itself. file.backup() will look at a file, find its last modification time, and create a new backup with a name that appends YYYYMMDD-HHMM to the file name. So now, whenever I worry that running write.csv or saving a graph might destroy something valuable, I use an idiom like fn
2010 Aug 17
1
MySQL Connect problem...
Right, I'm baffled. I have: exten => s,1,MYSQL(Connect DB1 127.0.0.1 geraint xxx amis2) exten => s,n,MYSQL(Query NORESULT ${DB1} INSERT\ INTO\ recordings\ (caller_number\,called_number\,date_created\,date_started\,in_use\,server_id)\ VALUES\ (\'${CALLERID(number)}\'\,\'${ARG1}\'\,NOW()\,NOW()\,\'Yes\'\,12)) exten => s,n,MYSQL(Query RESULT1 ${DB1} SELECT\ LAST_INSERT_ID()) exten => s,n,MYSQL(Fetch FOUND1 ${RESULT1} VALUE1) exten => s,n,MYSQL(Clear ${RESULT1}) ex...
2006 Dec 28
0
problem with assert_raise in Unit Test
...an exception when I try and update a column with a duplicate foreign key. Inside the unit test, charge.time_logs << time_logs(:first) will generate ActiveRecord::StatementInvalid: Mysql::Error: #23000Duplicate entry ''20'' for key 2: UPDATE time_logs SET `task_id` = 1, `date_created` = NULL, `time_charge_id` = 20, `hours` = 2.0, `log_entry` = NULL WHERE id = 2 However, assert_raise ActiveRecord::StatementInvalid do charge.time_logs << time_logs(:first) end will generate <ActiveRecord::StatementInvalid> exception expected but none was thrown. W...
2011 Sep 21
2
Xapian-discuss Digest, Vol 88, Issue 9
...mple I am still a bit confused on how slotno actually works and what it actually is. I think the main thing is showing, in php (or C++ in the official docs), how to index a complex document of say: { "_id": string "text": string "tags": multivalue "date_created": timestamp } And sorting it via the different ways and showing exactly how to define that date_created is a timestamp and sort on that time stamp and also showing how to query tags field. This would really break the ice for anyone wanting to learn Xapian in PHP. Especially if they are used...
2006 Jul 07
15
Does Berkeley DB and Rails seem like a good match?
I''ve been reading up on Berkeley DB and I''ve been refelcting on the Rails philosophy and it just seemed to me like the two should go together hand in glove. Rails seeks to abstract the programer from squirrely database coding which is great. My only problem is that you''re still left with a large component, namely the databsase server (MySQL, PostgreSQL..etc) which