Displaying 20 results from an estimated 10000 matches similar to: "Noob Question - Variable Scope"
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 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 May 10
12
Strange Behavior on Non-Index Pages
If I browse to \myRoRApp, I get the "Welcome aboard" screen.
I''ve done the ruby scripts/generate controller MyTest, and "Rolling with
Ruby on Rails" tells me I should be able to browse to \myRoRApp\MyTest
and see an error page, but what I''m actually seeing is a fastcgi config
file!
I have installed fastcgi, but apache can''t "see" the
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 = ?'',
2006 May 10
2
Ordering of subsets in a model.
Alright, I got this table with lots of entries for menus. There''s
several menus (with their own model since each menu got some special
information). Now, I want to be able to specify the order of the menu
entries inside the menu. acts_as_list seems to not quite do the trick
since it does ordering "globally" on the whole model and
acts_as_nested_set seems like overkill since
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 May 27
5
ActiveSupport JSON working?
Hi,
I am trying to convert a hash to JSON using ActiveSupports built in
.to_json. I am doing similar to the example below but are there
certain strings that could go in place of ''bar'' or ''rez'' that will
break the to_json method? I am using a very long string from rjs
output in place of ''bar''.
Perhaps .to_json is not ready yet?
Thanks,
Peter
2006 Jul 05
13
interactive web app
I have an arbitrary program written in any language, and it is a binary
(ie foo.exe), that will print out output to stdout constantly every 3-5
seconds.
Is there a way that I can have a web application designed in rails that
will print the output of this program to the browser every 3-5 seconds
in realtime, preferably even in an ajax manner.
thanks
--
Posted via http://www.ruby-forum.com/.
2006 Dec 10
5
model-controller-paradigm: What about admin controllers?
Hi all
We all know the model-controller-paradigm: I have a model "News" which
has a corresponding CRUD-controller "NewsController".
But now I''m quite unsure about the following...
Guess we have normal visitors that visit our site www.??.com/news and we
have administrators that create and modify news items.
The admin should see an "Edit" link and a
2006 May 23
7
has_and_belongs_to_many question
Hello,
I am trying to make the "switchover" to programming my apps in Rails and
have a question about database structure.
In the past i would structure a many to many like this:
categories
----------------------------------------------------
| id | name |
----------------------------------------------------
1 Some Category
2 Another
2006 May 10
2
gain value from form
I have the following form
<%= start_form_tag :action => ''rejectQuoteSave'', :id => @project %>
<p><label for="offer_reason_rejected"><span class="required">*
</span>Reason</label><br/>
<%= text_area ''offer'', ''reason_rejected'' %></p>
<%= submit_tag
2006 May 08
7
How to get difference between two dates in days???
Hi,
I want to calculate difference between Current date & previous date
(stored in database). The difference should be in days. Hhow to do
that??
PLs tell me.
Thanx in advance.
Prash
--
Posted via http://www.ruby-forum.com/.
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 May 11
5
crating a ajax datagrid
hi,
Im looking to build a live data grid, where you can add delete rows
using dhtml.
and was just wondering if anyone is aware of any plugin''s taht may help
me.
Ive found this example but if anyone is aware of any other plugin''s
please let me know
http://unspace.ca/datagrid/update
thanks
scott
--
Posted via http://www.ruby-forum.com/.
2006 May 11
4
/public content security
Hello all,
I have a question regarding the security of my new web zine. The
idea is that I have editors that can log into the site, and then upload
comics in the form of a jpg. The way that I have this set up right now
is that the jpg is submitted through a form and then placed into the
authors sub directory in public/comics/. The record of the jpg is
stored in a pendingcomics table
2006 Jul 12
5
railsapp/db/migrate Newbie question
I made a mistake when making my first app. I did not use the:
ruby script/generate model <modelname>
method for creating my models. I more or less hand crafted each og
them. Is there a way to go back so I get my db migration scripts to
populate?
--
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 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