Displaying 10 results from an estimated 10 matches for "magicfieldnam".
Did you mean:
magicfieldnames
2006 Apr 07
6
Magic Field Names - "position"
What does the Magic Field Name position do?
I was looking here:
http://wiki.rubyonrails.com/rails/pages/MagicFieldNames
And unfortunately that documentation is incomplete.
Thanks.
--
Posted via http://www.ruby-forum.com/.
2006 Jun 12
2
on_update current_timestamp in Migrations
Is there any way to set database columns to auto update a timestamp
column on update?
Can I do something like
t.column "timestamp", :datetime, :default => :current_time, :null
=> false, :on_update => :current_timestamp
or do i need to just use custom sql like
sql = "ALTER TABLE `table` CHANGE `timestamp` `timestamp` TIMESTAMP ON
UPDATE CURRENT_TIMESTAMP NOT NULL
2006 Jun 13
2
Magic field ''Status''
I can''t find any documentation on the ''status'' magic field. It''s listed on
the MagicNumbers wiki entry, but not explained <
http://wiki.rubyonrails.org/rails/pages/MagicFieldNames>. Is it reserved for
later use?
Thanks,
Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060613/24060dfa/attachment.html
2006 Mar 26
5
How to write manage created_on and created_by via mixin?
Hi!
Definite newbie here - I''m working through this like-hate relationship with
Ruby and Rails right now... sometimes things work really well (like blobs
seem to rock) but other times, I dunno! :-)
Anyway, I''d like put in create and update user timestamps on all my primary
domain tables and allow them to be updated automatically by ActiveRecord.
Coming from Hibernate, I just
2006 Mar 20
1
Running total of a field in child records
What is the best way to get the running total of a number field in child
records. Let say I have an Order model, which has_many :line_items, and each
LineItem has an amount field. I would like to get the grand total of a
specific Order. Is it a good idea to add a ''total'' column in the ''orders''
table and update it every time a line_item is
2006 May 10
3
migrations :timestamp becomes :datetime in mySql
For some reason whenever I try and create a timestamp column with
migrations and mysql I get a datetime column instead. That''s kind of
annoying because I want the column to update every time the row gets
changed. Is this a bug, or is there something I can do about it?
(Obviously I can manually change my mysql table, but that kind of
defeats the point of migrations!)
In my migration
2006 Jun 01
4
What i do if i have a table with a column named "type"?
Hi everybody!
The class ActiveRecord::Base have a atribute named type and if my
table have a column with the same name i get an error if i use
model.finde, model.save and more...
I dont know what i can do to solve this problem!
Someone know?
Thanks
--
_________
Noel R. Morais
2006 Apr 05
3
how to insert Current DateTime value into database?
Hi,
I want to insert onto database the Current DateTime Value into database
field "Store_date" with datatype (DATETIME). How to do tihs?
I am usiing hidden variable into my form as follows:-
=======================
<%= hidden_field("store", "store_date", :value =>:datetime ) %>
=======================
But when I m submmittng form I couldn''t find
2007 Aug 30
2
RoR - Some Questions Before Starting
Hello everyone,
For some time I was studying Ruby on Rails, Active Record ideology and
other thing related with RoR right now I still know a lot more about
PHP than RoR. I am almost ready to start writing websites using RoR
and get more experience. But I still have some questions before
starting and I can''t start without answers.
If you could simply answer some of them, would be great.
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