search for: nicwern

Displaying 20 results from an estimated 23 matches for "nicwern".

Did you mean: nicer
2006 Jan 17
5
file_column mangling URL
Hey, I''ve gotten file_column to upload a file, drop it in the dynamic directory, but I can''t display the image, the directories repeat themselves: My model: class Person < ActiveRecord::Base file_column :image_url In my view: <%= image_tag url_for_file_column(''person'', ''image_url'') %> HTML generated is this: <img
2006 Feb 17
4
Why doesn''t this work!
I have this in my controller... @tech_standards = TechStandard.find_by_sql("SELECT * FROM tech_standards WHERE subpoint <> 0") Everything is fine except when I look at my view I still get supoints that are 0. When I run this query in my query browser I don''t. View: <select name="resource[tech_standard]" id="tech_standard">
2006 Feb 17
5
getting old values
Hi all, I''ve add :before_update event to my model Before updating a record I want to check if new attributes differ to old attr. My question is how to retrieve old attributes in :before_update event ? thanks -- gratis egold 1$ http://shegold.com/
2006 Jan 07
4
GIS Image coordinates / markers?
Hey everyone, Is there Rails support for something like Google Maps, but using my own images/maps? Basically, I''d like to have my own maps/images, be able to drop markers on them, center on certain attributes etc. - Nic
2006 Jan 16
4
Creating two records at once
Hi there, I have a User model and a Profile model. A user has_one profile, and a profile belongs_to a user. The profile model contains a user_id column as the foreign key. The problem comes in when I want a user to register. In the user_controller I have a method that creates the user. I also want the profile model to be filled in with the appropriate user_id foreign key (I don''t care
2005 Dec 20
6
Database Query on the fly Using Forms
I am a freshman when it comes to RoR, and I haven''t been able to figure this out. I need to figure out how to query records in my database using form check boxes (or radio buttons) then display them in that same instance. What would this look? I have been told that just putting a question mark after here, :conditions => field = ?, but what would the argument look like? Thanks in
2006 Jan 07
2
OFF-TOPIC; Can''t post to this mailing list
Hi all! I can''t post to this list from my regular gmail account. I receive fine, but whenever I send mail, no joy. Any ideas? There has to be more to life than posting via www.ruby-forum.com and reading it in gmail, then responding from ruby-forum etc. -- G. -- Posted via http://www.ruby-forum.com/.
2006 Jan 08
1
Subclassing only a specific portion?
Hi, I''m sure there is an easy way to do this, but I just can''t see it: I have a large amount of rooms, that are for different purposes, and for only one ''purpose'' do I want to create a specific subclass. Ex: banquet,wedding,admin. I want to have additional information about admin rooms. Trying to use the ''type'' field just gives an error
2005 Dec 20
2
Modifying data before update or save
Hi, I''d like to upcase a variable before it is saved, but I''m not sure how to access the incoming param or where this work should be performed: In my update method, I have: @device = Device.find(params[:id]) params[:device[macaddress]].upcase <-- problem code if @device.update_attributes(params[:device]) ....usual stuff here ''macaddress'' is the
2006 Jul 16
6
Pin in the Map - "tinyurl for maps" rails app
Hi there, A little while ago we launched Pin in the Map (http://pininthemap.com), a rails application which allows you to easily mark a spot on a map, attach some text to it, and get a simple link to pass around. It''s basically tinyurl for maps. It''s proved useful for organising after-work drinks, meetings, weddings plus a whole variety of other things. http://pininthemap.com.
2005 Dec 14
5
inserting multiple rows
I have table which stores multiple entries. Each row has user_id, game_id and a pick_id. On a page the user has to make load of choices. All this gets submitted. the html looks like so: <input type="hidden" name="game_id" value="3"> <input type="hidden" name="user_id" value="19"> <select name="pick[3]"> ....
2005 Dec 29
14
Rails 1.0 - Agile book still good?
I''m new to Ruby and RoR but excited to learn what I can do with RoR; I have Pickaxe second edition and want to get "Agile Web Development with Rails" but I''m aware that the book was published some while before RoR version 1.0 was released. Has a lot changed since then, and would I therefore be advised to wait for a second edition of AWDwR? Many thanks in advance
2006 Jan 05
6
Inheritance Question
Hi, My application has a table of People that has information about them, and I want to have a subset of those people as Users - people that can login to the application. What is the best way to do this? Add columns to People that only Users would use? I''ve read the threads on single table inheritance, but it seemed a little bit wasteful: 10,000 people vs 50 users For those more
2006 Jan 10
7
Application Design Question
I am designing an application to run a fishing tournament I am hosting. Each fish entered will be given a point total based on the length of the fish and the species of fish. Each species has a point multiplier. For Example Trout have a multiplier of 10 so a 20 inch Trout would have a score of 200. My conundrum is in where and when do I calculate the points. The options I have come up
2006 Jan 15
13
Hotlinking an entire row in an HTML table
Hi, This seems simple but I cant get it to work... I have a table with 4 or 5 columns and 20-30 rows. I''d like to have the ability to click anywhere in a particular row to fire an action, such as bringing up a "Details" page for the clicked row. This would eliminate the need to generate a "Details" link at the end of every row, which is what I have now and looks
2006 Feb 17
0
file_column generating random empty images
Hi all, I emailed Sebastian awhile back about this, but I know he is busy, so I''m asking for your help. I''m using the latest version of file_column from SVN, or the non-SVN version (doesn''t matter), but on some files, file_column will create 0kb files. The tmp directory will contain the correct file size, and I copied the temp over the 0kb file, and then it
2006 Feb 20
0
Best Practice: Validating and returning conflicting object
Hi, I have validation that checks for uniquess, but when the user enters a non-unique attribute, I''d like to present *what* the existing object is: For example, if I specified an IP address for a Device, and that IP already exists for another Device, I''d like to display the attributes of the existing device to help the user out. Right now, it just gives the user the obvious
2006 Feb 23
2
Stripping out non-word characters?
I know this is a more Ruby thing, but I want to strip out all non-word (\W) characters from a string. Is there a regexp way to do this? Right now, I have: params[:object][:item].sub!(/(\W)*/,'''') but that only removes the first instance, not all non-word chars. Thanks, - Nic.
2006 Jan 10
0
Linking different Models together and walking them dynamically?
Hey all, I''m doing something of a node-node connection, and I want to eventually walk each node, pulling data from each node, and displaying the path. The DB table would just be columns of IDs that link to each other My catch is that these aren''t generic nodes, they are Models that could potentially connect to each other, and I don''t know how to
2005 Dec 17
0
Dropping in example code doesn''t get processed
Hey all, I''m using the Agile book, and I wanted to try some of the demo code. So I dropped one of the folders ''web2'' into my webroot of Apache, and tried to access a controller from the browser. I just get the usual 404, but I have an identical directory structure setup w/RoR code that I''ve generated w/scaffolds, and that works fine. Am I missing something