similar to: Duplicate entry - how to check if an id exist before saving?

Displaying 20 results from an estimated 2000 matches similar to: "Duplicate entry - how to check if an id exist before saving?"

2006 Mar 01
7
Instant Management Frontend with the Scaffolding Extensions Plugin
I''ve updated the Scaffolding Extensions Plugin[1] recently to add a couple new features: 1) Scaffold all models and associations with one command 2) Show all associated objects on the edit page Example of usage: In an existing Rails application, create a controller (i.e. "script/generate controller crud"), and modify so it looks like: class CrudController <
2006 Jan 25
9
connection_specification and adapter
Hi, I wish to know, how those class work exactly, where can I find the documentation? or can someone explain to me how a connection is made via those class??? Thanks you very much!!!! Saiho __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
2006 Feb 28
2
search button on ruby-forum.com isn''t working
I''d like to search the archives, but when I click on ''search'', the search page doesn''t show up. When will the search engine be up again? -- Posted via http://www.ruby-forum.com/.
2006 Apr 04
9
Does ActiveRecord have support for "Boolean" columns?
Hey all -- I''ve been using enumerable char(1)''s with ''y'' and ''n'' values for my Boolean columns in Rails, but it strikes me there should be a better way. How do you setup columns that represent true/false-ness in your schemas on Rails? Wondering what kind of standard approaches there are other than me writing something like class MyEntity
2006 Feb 27
6
One to Many example... please!
Hi, I am pulling my hair out trying to work out how to put together what should be a simple app in rails. The app is to CV''s so I have a table of CV''s and each CV can have multiple skills. Skills are in a 2nd table below; CREATE TABLE cvs( id INT not null AUTO_INCREMENT PRIMARY KEY, first_name VARCHAR(30) not null, family_name VARCHAR(30) not null, email
2006 Feb 27
16
Rails 1.1
It was said at one time that Rails 1.1 might be released in February. Is that still likely? Thanks, Don Mc -- Posted via http://www.ruby-forum.com/.
2006 Jan 09
1
AR: Quoting in Join Model Test
Greetings made men of rails! I am presently writing a new database adapter for rails to bring the OpenBase community on board. In working through the rather extensive AR tests (which I very much appreciate), I have come across a question I can''t seem to answer on my own. In the test_has_many_with_piggyback(AssociationsJoinModel) the result is expected as a quoted integer
2006 Mar 02
3
validates_uniqeness_of
Hello, I am trying to understand usage of validates_uniqeness_of. Say I have, two column ''name'' and ''email'' in my table users three unique key is possible for these two columns 1. name 2. email 3. name and email together My question is, if I write validates_uniqueness_of :name, :email what uniqueness is it going to apply, 1 and 2 or, 3 ? Thanks, Mohammad
2006 Jan 23
2
Redundancy recomendations?
I am working on a RoR project that fetches some of its data out of an existing database. The database server is physically located in Florida. When Wilma went through there were problems, I''m not sure how much of it was server related or the network connections between Illinois and Florida. Long story short we are now looking at deploying a geographically seperate servers for both for the
2006 Mar 02
17
can''t get rails to connect to mySQL - HELP!!!!!!!!!
Sorry, but this is really NOT as easy as the tutorials/books make out. I''m really struggling at the first hurdle here. And while I''m not a programmer by design I do know my way around most stuff. And if I can''t get this to work I suspect more people will have the same issues. There seems to be too many variables to address. I have winXP, I have ruby and rails all
2006 Mar 20
3
rhtml templates and syntax
Hello, where do we need <% -%> in templates ? What is the difference between <%= %> and it ? -- Posted via http://www.ruby-forum.com/.
2006 May 18
2
acts_as_ferret 0.2.1
The svn repository for acts_as_ferret has just been tagged with version 0.2.1. This is the first version of aaf to support the 0.9.x branch of Ferret. See http://projects.jkraemer.net/acts_as_ferret/wiki *Features* * High speed full text search across the contents of any Rails model class, without any hassles. The index will be kept up to date automagically while you work with your Rails
2010 Mar 13
6
Find first or create
Is there any ActiveRecord''s dynamic finder that can allow me to find first association or create it if it doesn''t exist. Something like this (not this code is conceptual - it does not work!): Comment.posts.find_or_create(:first) -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2006 Feb 14
3
Can Ajax updates more than one <div>?
Hi, I wish to know, is it possible that Ajax can update more than one zone "<div>"???? like : <%= link_to_remote("Title", :update => ''mydiv0'', :url => {:action=>:say_hello} )%> <div id="mydiv0"> to be changed one</div> <div id="mydiv0"> to be changed two</div> When I execute the code, only
2006 Apr 03
4
Edit in Place in 1.1
Does anyone have a good example or know of some documentation about how to implement "Edit in Place" using Rails 1.1? Like the functionality in Flickr... I''ve googled and googled and can''t find any good documentation. Maybe it''s because 1.1 is so new? Thanks in advance. -Andy
2006 May 05
7
Testing model: test becomes dependent on previous test
Im having trouble with Testing models. im following the tutorials in the book Agile Web Development with Rails. if i execute the code product_test.rb, i get this error: ============================================================ 1) Failure: test_update2(ProductTest) [test/unit/product_test.rb:30]: <29.95> expected but was <99.95>. 3 tests, 11 assertions, 1 failures, 0 errors
2006 Mar 08
3
Run command via SSH session displaying results via AJAX
I am trying to create a web app that allows me to invoke a command on another server via an SSH session. I am currently doing this as follows: 1) User is presented with a form to enter server, command, username and password. 2) User clicks "Run" and form is submitted to the "run_command" action. 3) The "run_command" action initiates an SSH session using net-ssh
2006 Jan 25
2
Testing a model method - private method?
Hi everyone, I''m trying to test a method in my model: def html_email return "<a href=''mailto:" + self.email + "''>" + self.email + "</a>" end The method works ok. But when I try to test it: assert_equal ("<a href=''mailto:" + people(:staff1_person).email + "''>" +
2006 Dec 29
3
Functional test a "create" action when a validation fails
I''m trying to write a functional test of a "create" action in one of my controllers. In the corresponding model I have a "validates_uniqueness_of :location". In the test case I am constructing I have the create fail with the error "Location has already been taken". Is there a way I can write an assertion like: assert_equal "Location has already been
2011 Mar 26
2
How to deserialize an array from XML
Hi, to serialize an array to xml we can use: an_array = [ 1, 2, 3] an_array.to_xml But to I can''t find a way to convert back XML to array. I didn''t find a method Array.from_xml like Hash.from_xml. Any ideas? Thanks, Gustavo -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email