search for: njmacinn

Displaying 20 results from an estimated 44 matches for "njmacinn".

Did you mean: njmacin
2006 Apr 27
12
Stealing users IP address
Is there a functiaon to take the IP address of person who submits to a form example: <input id="user_ip" name="user[ip]" type="hidden" value="<%= some_ip_call %>" /> -- Posted via http://www.ruby-forum.com/.
2006 May 27
2
[Repost] OpenID and my db schema
Hi, I posted this before, but didn''t get an answer, so I''m trying again. I''ve recently decided to use OpenID to let users log in to my site instead of old fashioned account creation. They''ll be able to add a small amount of personal details (about three things) to their account, and post messages in the site BB. I have an openid_users table which stores the
2006 May 24
4
AR foreign key problem.
Hello Railslist, (I''m using RadRails 0.6.3 on Windows XP with Ruby 1.8.4, Rails 1.1 and SQLite3) I have two tables in the database: "locations" and "customers": customers.sql --- id INT PRIMARY KEY name VARCHAR 255 address VARCHAR 255 postal_code VARCHAR 255 city VARCHAR 255 --- locations.sql --- id INT PRIMARY KEY postal_code TEXT longitude FLOAT latitude FLOAT
2006 May 24
5
rxml vs rhtml
I have been wondering if anyone here knows which format is faster for your templates? I am curious cause in the near future I may be using some expensive scripts (timewise) and would like to try and squeak out as much performance as possible. Is Ruby like other languages (ASP classic for example) that inccur a penalty by switching between HTML and Ruby Code? Ben -- Posted via
2006 Apr 08
7
How to create your own markup language ?
I''m actually looking to create my own markup language, after a look to the greats markdown and textilize markup languages they seem to be more complexes that what I need, so not feating with my application. Any help is welcome ;-) -- Grosjean S?bastien
2006 Apr 22
6
Friendly Reminder (OT)
Today, I had a tragic hard drive crash. I hadn''t updated anything to SVN in two weeks. I''m posting this here as a reminder to my beloved Rails community. Everyone, right now..... make a backup of your rails work. Make sure its on two disks. Many of you already do that automatically, but just make sure its working. Two near-release rails plugins were lost in the tragic crash
2006 Mar 31
4
javascript help
Hi list, I have a list of tags. I want to be able to click on a tag and have that tag name populate an input field. I think delicious used to allow you to click on existing links to tag your bookmark similar to this (moving instead to auto_complete). My guess is the code looks something like this.... <form> <input type="text" name="all" id="discover"
2006 May 29
19
WYSIWYG Editors and Rails
Hi everyone, I''m currently investigating re-writing our School CMS application in Rails and the only drawback I can see is there isn''t an ample supply (if any) of WYSIWYG In-browser editors written with a raw Ruby backend. We currently use KTML4 which is written with PHP as a base. I''m interested to hear from anyone who''s integrated a PHP based editor into
2007 Oct 12
6
abstract_class... what exactly does it do
Hi, Does anyone know much about abstract_class? Does it actually prevent instances of the class from being created? Does it disable certain methods? I already know what it''s for, but I want to know what setting self.abstract_class=true actually does. The reason I ask is that I want to use it for a slightly unorthodox purpose. I want a class who''s only attributes are its
2006 Apr 01
2
Can i cache models?
Can i cache models that never get changed? -- _________ Noel R. Morais
2006 Apr 15
4
sql injection
Hi, All through my current project, I''ve been assuming that rails is clever enough to prevent SQL injections automatically. Is this right? If not, what''s the best way of doing it? -Nathan
2006 Mar 31
2
[Howto] custom and translated AR validation error messages
Hi, I''m putting the finishing touches on a multi-lingual application, and just posted a blog entry on how I did translate validation errors generated by ActiveRecord at: http://www.myowndb.com/blog/?p=4 I found it surprisingly easy, and thought I''d document it. The translation is based on a plugin I plan to publish really really soon, more info whith the upcoming announcement.
2006 Jul 21
4
weird table pluralization problem
When I created a new project and a "equipment" model for an unknown reason to me rails tried to query the table "equipment" and not "equipments", does someone know why it did that ? So I added set_table_name "equipments" in the model class and it now works but I don''t really understand why it is required in the first place... -- Posted via
2006 May 17
10
Weird error
What does this mean? (eval):1:in `compute_type'': compile error (eval):1: parse error, unexpected tINTEGER Object::0 ^ Anyone know? Any help counts! Thanks in advance, Mohammad(Programmer-22) -- Posted via http://www.ruby-forum.com/.
2006 May 11
2
Making my site multi-lingual
Hi, I''m wondering how I should go about making my website multi-lingual. Basically, there will be different content for the different languages, and that''s not really a problem... all I need to do is give each content entry in the database a language_id. But the problem is with the non-content text, eg, "In order to access this area, you must be logged in",
2006 Mar 23
3
when (not) to use belongs_to
I know you get a lot of questions like this, but I couldn''t find one which answers exactly what I''m after. I''m reasonably new to rails, and I''m having a bit of trouble with when to use belongs_to. On the rails wiki ( http://wiki.rubyonrails.org/rails/pages/belongs_to), it says "In general, the Foo model belongs_to :bar if the foo table has a bar_id foreign
2007 Apr 12
4
Installing rspec in Windows
Hi all, I''m trying to install rspec and I''m having a problem. C:\Users\Nathan\Documents\rails\myproject> gem install rspec Bulk updating Gem source index for: http://gems.rubyforge.org Successfully installed rspec-0.8.2 Installing ri documentation for rspec-0.8.2... Installing RDoc documentation for rspec-0.8.2... C:\Users\Nathan\Documents\rails\myproject> ruby
2006 May 22
4
naming convention for bridge tables.
I read somewhere that the correct naming of bridge tables is in alpha order. For example. I have two tables: houses, and colors. If I want to create a bridge table to associate colors with houses, I would name the table: colors_houses The associations work fine. But, if I have a table named: track_houses. Building a bridge table called: colors_track_houses, gives me model associaton errors.
2006 Mar 31
2
"Owning" a polymorphic
I''m playing around with RoR and I''m having trouble figuring out how to describe a certain relationship. I''m building a social networking site where you have users who can comment on other users, photos, videos, and blogs. I''ve figured out how to have a comment belong to a user or media item through a polymorphic relationships but I dont'' know how to
2006 Apr 19
9
geolocation db?
I''m currently planning a social app in Rails that relies on being able to see how far you are from everyone else. It''s my intention to store rough geo-coordinates as part of the sign up process. My intention is to capture their zipcode or postal code, and then be able to query a webservice once for that data. It''s also possible that there might be a database or even