similar to: Save item to DB x times (howto)?

Displaying 20 results from an estimated 5000 matches similar to: "Save item to DB x times (howto)?"

2006 Feb 27
8
Change Bit Value To Text When Viewed
Hey All, very simple question for you folks ;) I have a @commutes object that for each record there is a bit value set (0/1) to denote if an accident occurred. What I want to do is have it display "Yes" or "No" when I view the listing of commutes. I can get it to display the bit value just fine with <%= commute.accident %> but how can I get it so that when a record with
2006 Apr 21
1
Data access problem in object when using acts_as_authenticated
Hi all, I''m running into this frustrating issue with the acts_as_authenticated plugin and one of the additional fields I added to the users table. I have added a column ''account_type'' to the users table (among several others) which denotes the type of account it is. This stores an integer value that is set by the system during account creation. The value is getting set
2006 Apr 29
1
Display SVN Revision Number in a View
Is it possible to display the SVN revision number in a view? I''d like for this to be done automatically and not something that I''d have to update each time the revision is updated. I know that it is kept in a .svn file or something, but I am curious if anybody out there has done something similar in the past. Thanks, Ryan -- Ryan Prins rprins@gmail.com http://www.lazyi.net
2006 Jun 21
2
error_messages_for not displaying validation errors
Hi all, I''ve been searching the web and the list archives for help on this and I''ve found some tips, but I''ve been racking my brain on this for hours. I have a Model, View, and Controller that are handling the uploading of a file to my server. I want to make sure that the description is set and that a file is selected to be uploaded. I have set validates_presence_of
2006 May 05
3
OT: Require e-mail during sign up process?
Sorry that this thread is a little off topic, but I''m looking for some varying opinions on the subject and I think this group has a breadth of experience on this matter :) A little background info... the registration process for a web application I am developing will be targeting those ages 13+ with the bulk of the users being in the 13-25 age range. We are in the process of developing
2006 Apr 27
2
check_box_tag and :disabled => ''disabled'' problem
I''ve been using the check_box_tag to generate checkboxes for an application I am working on and I''ve run into a little hiccup. When I set the options for the checkbox to be { :disabled => "disabled" } the checkbox becomes disabled, as I would expect. However, if I set the checked value to true and keep the disabled option, the value for the checkbox is not returned.
2006 Jun 29
9
Handling multiple developers making migrations and using svn
Hey all, I''ve run into an interesting scenario that I think some of you might have some suggestions on. I am currently working on a RoR project and we are making full use of the migrations. We are also using a subversion repository for our source control. Now, the problem.... We are both making migrations and checking them into SVN. So, if in our checkout we have migrations up to 10 and
2006 Mar 13
3
Convert line breaks to paragraph tags
Hi All! I have a small problem with a data conversion that I am doing from WordPress to a custom app that I am building in rails. In WordPress, line breaks were handled in the PHP code and converted to <p></p>. What I am wondering is, how can I add in the paragraph tags around lines of text (e.g. <p>some text that is line 1</p><p>some text that is line 2</p>
2006 Feb 28
1
Validate two fields so they do not match
Hey all, I have two form fields (select dropdowns) that are ''startlocation'' and ''endlocation''. These two cannot be equal to each other on save and I am wondering how to put validation into the model for this. Is is possible to do it in the model, or do I need to do this in the controller? Thanks in advance! Ryan -- Ryan Prins rprins@gmail.com
2006 May 17
1
Renaming controllers/views/models
Hi, What would be the best way to rename a controller and associated models/views ? Do we have to do it by hand ? Is there a tool that could help us renaming pluralized words too ? Mickael. On 5/11/06, Ryan Prins <rprins@gmail.com> wrote: > Following up on this, does this delete the associated tests as well and > other items that are created when you do script/generate controller
2006 Apr 25
0
Need help making code more rails like!
Hi all, I''ve been a PHP programmer for many years and I''ve recently picked up ruby and rails and am loving it! However, I''m still learning the "rails way" of doing things and I''ve got a block of code that I think could use a face lift. Any help, tips, suggestions, you can offer in making it more rails-like is greatly appreciated. The only thing that I
2006 May 12
2
Problem regarding accessing attributes from object...
Hi, I have an object (@cnt). Now when I am calling "@cnt.inspect" on object it gives me output as follows:- ----output---- [#"3"}>] ----------- Now in aboove output the number between double quotes (3) which is of my interest & I want to display it. How to do that? Actually this is my method:- ==================================== class Tagging < ActiveRecord::Base
2006 Jul 21
2
Migration Date Format
Just wandering if anyone can tell me how to format date when writing test data to upload to the db via a migration. ie, to match the date migration column format thanks -- Posted via http://www.ruby-forum.com/.
2006 Jul 23
2
pagination_links and friendly urls
my pagination_links seems to auto generate the links using the current controller, action and id. The page they''re appearing on however have a friendly url I have created. I want to be able to make pagination urls generated by pagination_links "user friendly" as well so that they match my current naming convention.....i know there must be a way to do this....any ideas?
2006 May 11
2
open and close helper tags?
Hello everyone. I have a custom thumbnail gallery that I am creating with images pulled in a specific order from an array of image ID#s. What I essentially want to do is have a helper-setup where I can do an opening helper tag, such as <% open_image_gallery %> and then be able to place inside of it specific tags associated to the options specified in the opening tag, say the list of
2006 May 12
3
How to implement a global partial?
Quick question: Whats the easiest way to implement a global partial? Where I can call one partial from many different controllers (err controller views)? -- Posted via http://www.ruby-forum.com/.
2006 Apr 27
2
Red cloth
what is the require I must put in my enviremnt to use red cloth? -- Posted via http://www.ruby-forum.com/.
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 Mar 17
4
Noob question about the "show" function
i''ve got a cool app going and it''s getting bigger and bigger, but now i''m trying to customize the show function. i''m using the scaffold code as a base but can''t seem to get anything to look right. i guess i''m confused about how exactly the scaffold code works for the "show" function. any help would be awesome! thanks. jon --
2006 May 04
3
Rubyonrails.org Website Blocked
Hi Everyone, This is basically an FYI because I don''t think there is much that can be done about it. I work at a DoD lab and up until very recently I had no problems at all getting to rubyonrails.org. All week long I have not been able to visit the site and I finally gave up and submitted a trouble call to our network help desk. I was told that the site was in a class B range