Displaying 20 results from an estimated 10000 matches similar to: "railsapp/db/migrate Newbie question"
2006 Feb 27
3
Newbie Question
Hi! I just ran the first few Rails tutorials and I''m really impressed
at how quickly I was able to get something up and running.
I''m slowly emerging from the stone ages, and leaving my powerbuilder
behind ? yes, I know, keep the snickering to a minimum please! I
started into J2EE/STRUTS, but was quickly frustrated by how long it
would take to code anything but relatively
2006 May 10
4
Single Table Inheritance problem
I have two tables I am using single table inheritance with: Page and
Item. "Page" has many "Items"; "Item" belongs to "Page".
Item Model:
class Item < ActiveRecord::Base
end
class Article < Item
belongs_to :page
end
Page Model:
class Page < ActiveRecord::Base
end
class Issue < Page
has_many :articles
end
In my controller, when I
2006 Apr 11
15
Migrating rails 1.0 app to 1.1 - Noob question
Hi all, I''ve upgraded my system to Rails 1.1.1 successfully.
After much looking I haven''t found out how to migrate an existing
application to a new rails version though. What is the procedure, if
any, for upgrading the application I''ve developed in 1.0? Is there a
script I need to run?
--
Posted via http://www.ruby-forum.com/.
2006 Apr 15
6
Good image API for RoR?
Hi, I need a relatively simple image api for the app I''m writing. I
need to copy photos, rename them, and re-size them to put them in a
standard format.
I tried using RMagick/Imagemagick, but the photos would be corrupted on
re-size, so I''m looking for some suggestions.
--
Posted via http://www.ruby-forum.com/.
2006 Apr 14
3
Many to Many
Hi, I have three tables, a domain of Sites, a domain of Users, and a
junction of Sites_Users with the tables named as such.
My RoR application has a model and controller both User and Site. I
tried to add a controller and model named Site_User but I can''t
reference any functions in the controller, I get an Uninitialized
Constant error.
I''m very new to RoR, but not to
2006 Jun 22
2
RoR Event Calendar
Does anyone know of a good open source event calendar done in RoR?
--
Posted via http://www.ruby-forum.com/.
2006 May 08
2
Noob Question - Variable Scope
I feel awful asking such a basic question, but here it goes....
I have a controller, "NewsController".
The user enters and the "list" action is called and I populate an
instance variable "@news" which contains all the elements I''d like to
display using a form.
The user then changes something and the "update" action is called.
Is
2006 Jul 12
10
Recurring mySQL Error
I am getting the following error when running my app on the server:
mysql::Error: Lost connection to MySQL server during query: <some SQL
here>
The SQL is usually a SHOW FIELDS statement, but after scouring the log
files I see that it occassionally happens with other queries as well.
I did a little research, and one topic I found suggested that I edit the
/etc/mysql/my.cnf and increase
2006 May 11
18
Object constructors - Noob Question
Hi: Sorry if this is a painfully stupid question...
I have some data I need through the life of someone''s session. In the
application controller, I grab the data and store it like so:
session[:foo] = @foo
Now, whenever I need to access data about foo I don''t need to cause any
DB io, I can just grab foo from the session (it''s very small fyi).
Here''s what I
2006 Apr 27
2
Noob Design Question
I have chunk of data that I need for the life of the session. I am
going to use it for selects through out my app.
Is the best place to keep this data in the session? Is the session
easily spoofed or cracked? While viewing the data is not critical in
itself, spoofing it could cause me massive headaches.
--
Posted via http://www.ruby-forum.com/.
2006 Apr 19
4
Weird Problem - probably a noob mistake
I was up late last night trying to find the cause of this, but I''m
stumped.
I have this relatively simple controller to load up a bio. It''s basicly
id, name, desc, type (I use STI).
class BioController < ApplicationController
layout ''layouts/singlepanel''
def index
@bio = Bio.find(:all, :conditions => [''site_id = ?'',
2007 Feb 06
3
Polymorphic either or but not both
I am trying to create a generic person model. Then subclass it as
either a professor or an author. The only problem is that since some
professors are authors, I don''t want duplicate entries. Any ideas on
how to handle this?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"
2006 Jun 23
13
Best OS Choice for Rails server?
I am going for a dedicated hosted server for a rails app I am working
on, and have a choice from several different operating systems. I
excluded windows 2003 from the list because it has been giving RMagick
fits for me.
The app is Ruby 1.8.4, Rails 1.1.2, mySQL 5.0
The contestants are:
Red Hat Enterprise 3.0
Red Hat Enterprise 4.0
Debian
CentOS
FreeBSD
I''m leaning towards Debian,
2006 Apr 30
4
Server IP
Can a ruby on rails app obtain the ip of the server it is running on?
I''d like the application to be able to determine x set of data is for y
data, for example:
These domains all point to the same ip...
mydomain-1.com
mydomain-2.com
mydomain-3.org
I can obtain the domain name from the request by using:
@request.domain
I''d like the application to grab the corresponding ip for
2006 Jan 05
0
I found a way to dynamically switch languages in your railsapp -- look at it and give your opinions
can you share the code so that others can benefit out of it???
silvy mathews
________________________________
From: rails-bounces@lists.rubyonrails.org
[mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of sekhar
Sent: Thursday, January 05, 2006 7:14 AM
To: rails@lists.rubyonrails.org
Subject: [Rails] I found a way to dynamically switch languages in your
railsapp -- look at it and give
2006 Apr 11
2
''rake rails:update'' Error - can''t upgrade to 1.1.1
''rake rails:update'' is causing the below error for me when trying to
upgrade my application. I''ve scowered Google and didn''t find much, has
anyone else had this problem and solved it?
C:\@cs\phase2>rake rails:update --trace
(in C:/@cs/phase2)
rake aborted!
Don''t know how to build task ''rails:update''
2006 Feb 28
3
Composite Key Support
Right now rails doesn''t support composite keys, that is id1, id2, and
id3 are in the primary key of the table. Does anyone know if this is
being discussed for future versions, or is it pretty much out of scope?
--
Posted via http://www.ruby-forum.com/.
2006 Apr 21
4
Dynamic Menu
Hi, I think I''m doing this the right way, but can''t get it going. I''m
building a menu from the values in a mySQL table, and want to build it
on the fly. This is something that should be working but only works
halfway:
<% @pages = Page.find(:all, :conditions => [''site_id = 4'']) %>
<% @pages.each do |p| %>
xyz
<%p.id%>
<%
2006 May 31
7
Rails, Transactions, and statements
Hi, I have a problem where I need an auto-incremented id back from the
database for a statement that has yet to be committed. The operation
that uses the id may fail, and if so, I need to rollback the database.
I can''t figure out how to send only the statement to the database
without the commit without sending over hard coded SQL. This is what I
started out with:
1 def add_album
2008 Apr 21
2
Eager Loading Polymorphic Associations
Hi,
I''m searching for a method of eager loading polymorphic associations under
activerecord 2.0.2. After some initial google-fu I came up with a link to
an enhancement that''s been added to edge:
http://dev.rubyonrails.org/ticket/8119
Anyone have any idea how long that might take to work its way into a general
release? I''m early in development now so I can afford to