similar to: Disabling updated_at/updated_on

Displaying 20 results from an estimated 100000 matches similar to: "Disabling updated_at/updated_on"

2007 Mar 17
4
Created_on and updated_on in a non-ActiveRecord model
Hi you all, I have a model simulating an ActiveRecord model, according to the tips stated in [1]. It is simulated because even though I am gonna save the attributes in a file, not in a DB, I still want the validations made by ActiveRecord::Base (see code below). Well, the thing is that I also want the behaviour of the created_on and updated_on columns, that get modified automatically before
2006 May 29
6
override automatic update of updated_on column
i know that title sounds confusing, but here is the deal: the two columns that we are concerned with for this question are the "updated_on" column and the "views" column. the views column increases everytime a user visits a certain page. like this: @object.update_attributes(:views => @object.views + 1) the problem is that when a user visits the page, it AUTOMATICALLY
2006 Apr 16
2
conditional updated_on update
Hi list, I''ve got some counter_caches in a model. When these get incremented - say on a page view - my updated_on column also gets updated. How can I conditionally not update updated_on if just these counter_cache columns change? The problem with that is that I am using acts_as_versioned which clones the record each time updated_on changes. I am successfully ignoring the counter_cache
2006 Jul 11
8
Stop updated_at from auto updating?
Hi Is there any way to temporarily stop the updated_at field from being updated when a record is modified with ActiveRecord? I have a date field which is keeping track of when the record data was last checked by my application and my app manually updates it, of course when I do this the updated_at field is also touched making it fairly useless for finding out when the actual data was changed
2007 Nov 14
1
has_many_polymorphs and acts_as_list ?
First, BRAVO for this wonderful plugin: has_many_polymorphs ! Now my problem: 4 models : Collection, Page, Fragment, Belonging (which is the join table): 1 class Collection < ActiveRecord::Base 2 has_many_polymorphs :elements, 3 :through => :belongings, 4 :from => [:pages, :fragments, :collections], 5 :as => :collector, 6 :parent_order =>
2006 Sep 03
7
using polymorphic associations with acts_as_list
This is what I have class Photo < ActiveRecord::Base belongs_to :image, :polymorphic => true acts_as_list :scope => image end class Place < ActiveRecord::Base has_many :photos, :as => :image end class Child < ActiveRecord::Base has_many :photos, :as => :image end I want to be able to reorder the images. What I need is for the position of the photos to be set
2013 Sep 11
1
when does 'updated_at' column get updated?
Using centos 6 with puppet-2.6.17 with thin_storeconfigs with mysql and nagios exported resources. Every time an agent connects to the master, the updated_at column in the hosts table is updated. However, the updated_at column in the other tables is not updated even when I alter a nagios resource attribute like retry_check_interval. What are the conditions by which the updated_at column is
2008 Jun 19
5
updated_at with client time not server time
Hi, I use the t.timestamps that are automatically added by rails. So there is the created_at and updated_at columns in the DB. When I create an entry those are filled with the server time when the request is created or updated. I want that to be the client time, if I do the request from Europe now I get US time in the DB. How to do it? Do I need to send explicitely time info from the client
2009 Oct 16
5
Rails 2.3 Model.touch(:column) always also updates :updated_at???
Hi, Am I the only one (i.e. something I do is wrong), or does the touch- method always update updated_at, even though giving it a column to use INSTEAD is meant to update just that column??? Thanks, Michael
2006 May 24
1
AR many-many join tables - can they have created_on, updated_on ?
Hello all, I''m creating a many-many join table between ''homes'' and ''users''. Can it contain created_on? will AR update created_on, updated_on on this table? CREATE homes_users ( home_id int not null, user_id int not null, created_on datetime null, updated_on datetime null ) Thanks for your advice! -- ------------------------------ Apple MacBook.
2006 Mar 22
10
Need for multiple acts_as_list
I have a model "Childmodel" that belongs_to two other models "Parent1" and "Parent2". "Parent1" "has_many :childmodels, :order => :positionp1" and "Parent2" "has_many :childmodels, :order => :positionp2". i.e. The child is independently positioned within each of its parents. This works fine and gets me the useful
2005 Dec 27
3
created_on & updated_on - helper to display date only
All, My initial list is rather busy. I would like to shorten the created_on and updated_on fields to just display the date, not the time. Best wold be a simple 12/28/05 type of presentation. I''ve found the format helpers in rdoc. (ie. distance_of_time_in_words_to_now ), but none seem to be what I''m looking for. How do I control the date format of a timestamp field? Thanks
2006 Jan 20
11
Userstamp Plugin
I''m pleased to announce a new plugin for Rails: Userstamp. You can read my blog post at http://www.delynnberry.com/articles/2006/01/20/userstamp-plugin and/or read all about it at the perminant page http://www.delynnberry.com/pages/userstamp. Any comments or suggestions for improvement are much appreciated. -- DeLynn Berry delynn@gmail.com http://www.delynnberry.com A dump of the Readme
2011 Nov 02
4
undefined method `updated_at' for #<Classified:0x686c5e4>
HEllo, I have the following problem with rails, I am new in this...is there anyone who explain to me what´s happens? Thanks See below: NoMethodError in Classified#show Showing app/views/classified/show.rhtml where line #17 raised: undefined method `updated_at'' for #<Classified:0x686c5e4> Extracted source (around line #17): 14: 15: <strong>Date Posted:</strong>
2006 Jan 13
0
Controller part of in-place editing
I''m doing some incremental improvements on scaffolding, and want to add in-place editing to an admin section. I think I may have the view part working right (at least, the editor pops up as expected) with this in my view: ### <% for link in @links %> <tr> <td> <div id="<%= ''url'' + link.id.to_s -%>"><%= link.url
2008 Feb 12
4
Syntax of session's updated_at field ?
What''s the syntax to acquire the updated_at value of a session stored in a db? session.updated_at doesn''t work. can''t find any docs on this. -- gw --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2007 Aug 15
3
ActsAsList specs
Hi, How are people specifying models which act_as_list? I''m thinking that it would be possible to check that acts_as_list instance methods have been added to a class using something like this: describe Page, "acts_as_list" do it "should act as a list" do Page.ancestors.should be_include(ActiveRecord::Acts::List::InstanceMethods) end it "should use
2008 Jul 02
3
update_all not changing updated_at
Hi everyone- Model.update_all works and changes the records, but it''s not changing the updated_at field. Am I doing something wrong or is this by design? Thanks, Dino --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2006 Apr 14
4
Newbie stuff (.new method)
Hi- Ruby 1.8.2 Rails 1.1 so I''m trying to build my first rails app and I''m trying to understand how the helper methods work. For instance .new & .save . For instance, I''ve created a table of Objects, and generated a scaffold. I see that in the controller, there are calls to Object.new and Object.save. I''m assuming that these are methods inherited
2006 Apr 01
3
acts_as_list with scope : position update problem?
Hello, I''ve tried to set up a class with acts_as_list with a scope argument that restricts a list to records with the same foreign key. For example : database : CREATE TABLE `families` ( `id` int(11) NOT NULL auto_increment, `name` varchar(255) NOT NULL default '''', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ; INSERT INTO