Displaying 20 results from an estimated 3000 matches similar to: "layouts"
2006 Mar 14
5
GROUP BY and SUM
I have orders, order_items, and products.
I want to collate several orders so that I can get a SUM of quantities
ordered for each product etc.
Can I say something like (the below gives an error on :sum, and ignores
:group)
OrderItem.find(:all, :sum => ''quantity'', :group => ''product_id'',
:include => [:order, :product])
I want to get back a
2006 Mar 16
2
how to limit standard layout on action
I have an action/view that I need to return only data (other external
processes query this action/view) but I need the standard_layout
template to be attached to the other actions/views in the same
controller. ie, the editing of the data in the model needs to include
all the navigation, except one view which should just return a
text/plain output.
how do I say "include
2006 Mar 28
4
1.1 won''t install!
I get this result in Terminal (10.4.latest)
pb12-olivier:~ ambush$ gem install rails --include-dependencies
Attempting local installation of ''rails''
Local gem file not found: rails*.gem
Attempting remote installation of ''rails''
ERROR: While executing gem ... (Errno::EACCES)
Permission denied -
/usr/local/lib/ruby/gems/1.8/cache/activesupport-1.3.0.gem
2006 Feb 24
6
Changes to Class File Not Being Recognized by Webrick
Newbie, having good luck with Dave Thomas'' book ''Depot'' application
until I discovered that changes to one of my .rb class files are not
being recognized until I bounce the webrick server.
Any ideas on this? Thanks.
--
Posted via http://www.ruby-forum.com/.
2006 Mar 24
3
generating a controller that inherits from a base controller
how can I generate a new controller that inherites from another bas
controller?
using: ruby/script generate myNewController command?
--
Posted via http://www.ruby-forum.com/.
2006 Apr 11
4
find(params[:id]) question
Admin Controller -
def show
@wizard = Wizard.find(params[:id])
end
View -
<td><%= link_to ''Show'', :action => ''show'', :id => wizard %></td>
URL -
http://localhost:3000/admin/show/1
I want user_name (one of the columns in the database) instead of the id
to show
For example:
2006 Feb 11
16
Why does''nt rails pick up more metadata from a mysql schema?
Hi,
when I define a db column to be non-nullable or of length 20 or as
numeric, I would expect rails to validate that, but that doesn''t seem
to be the case.
Any idea why that is? The metadata is accessible, at least in the mysql case.
I am using rails 1.0 with mysql 5.
Cheers,
Mariano
2006 Feb 03
6
Saving a User Object while in the Address Controller
Hi,
My saves are failing me and I can''t figure out why.
I am trying to save an address id to a user object just after I create
the address.
This isn''t the exact code, but it shows what I am trying to do.
class AddressesController < ApplicationController
def create
@address = Address.new(params[:address])
saved_address = @address.save
@user =
2006 Mar 31
6
Calculating Dates
Hello,
I am a complete newbie with Ruby and Rails. I am working on learning it
by writing a project I was going to write in PHP using Rails. I am
having a difficult time finding clear information on how I would do
this.
I need to take a date out of a table in my database and given another
day calculate the next 28 day anniversery of the original date. This is
used to calculate a delivery
2006 Feb 21
29
script/console
The agile book says "You can inspect variables, set values, add other
breakpoints, and generally have a good time".
This is very sweet and totally useless. For example, I want to see the session variable,
the cookies variable and so on. These names are unknown. I think I guess that the things
that are available depend on where you put the breakpoint() call. I''ve tried a
2006 Feb 07
3
Creating a new object with a passed in parent?
I have a simple object, Article, which has_one :parent of the same time.
On my Show page for a given article there will be a "new child" button
which will pass the current :id (or the current Article itself) to the
new form. What is the proper way to hide a reference to this parent in
the form so that when it is submitted back, the create method knows what
to do with it?
2006 Mar 31
3
ID fields not getting picked up
For example I have table Questions. With fields id, text, and test_id.
test_id is not being displayed in my view. I am hoping this means Rails
has picked up that it is an id for another model. If so, then how do I
utilize that?
If not, then do I need to avoid ''id'' in any field names other than the
main id field?
Thanks!
--
Posted via http://www.ruby-forum.com/.
2006 Feb 16
5
Firefox and IE performance with Rails App
In my rails application, certain computers were having huge problems.
There were certain pages that were exceptionally slow, even to the point
of timing out. Other computers did not have a problem. I finally found
that Firefox was the difference. When using Firefox on those computers
it works fine. The slow pages were typically posting a form with a
couple hundred fields.
This behavior was
2006 Feb 23
12
RoR site structure on Apache
I try a ''hello world'' demo here,you can see all my codes and structure
http://www.smtservers.com/demo/
I want to access the ruby app like this
http://www.smtservers.com/demo/say/hello
but I get a 404 error.
Please let me know why.
I am not sure the site structure is ok or not.Please give me a help
Thanks
Mark
--
Posted via http://www.ruby-forum.com/.
2006 Jun 24
4
blog generator?
Hi Guys,
I''ve been out of the rails loop for a couple of months.
Now Im about to deploy another new app. But I need to add a simple
weblog to the application...
has anyone done a weblog generator or do yoyu know of any weblogs thats
easy to integrate in a current app??
thanks in advance!
Mikkel Bruun
www.strongside.dk - Football Portal(DK)
ting.minline.dk - Buy Old
2006 Mar 28
3
[tip] making cached pages look dynamic
Hey
I just launched a new release of www.strongside.dk based on rails 1.1.
The site is in danish so it wont make any sense to most of you.
However, here at technique I want to share with you.
Some of the pages on that site requires a lot of calculations, but the
data is actually static. So these pages are cached.
However, when a logged on user is viewing a cached page, we still want
to
2006 Feb 19
5
can you give a answer?
when i tail -f my log:
i find this:
"Completed in 0.00233 (428 reqs/sec) | Rendering: 0.00005 (2%) | DB:
0.00118 (50%)"
i am sure, this request didn''t access DB. but why here DB is (50%)
it''s log wrong or my fault?
regards
--
Posted via http://www.ruby-forum.com/.
2006 Feb 20
2
How can i render an external url?
Hi everybody,
Well, how can I render an external url? In java, I do something like this:
<html>
<head>
<title>External URL</title>
</head>
<body>
<jsp:include page="www.rubyonrails.org" />
</body>
</html>
Noel R. Morais
RFC - Ready for Calls
+55 (11) 3471-4005
www.rfcnet.com.br
-------------- next part
2006 Feb 23
3
Correct to use Apache with Rails?
Hi, I have looking for the best way to integrate Apache 1.3.x and RoR. BTW,
I have gone through several different articles and I''m not clear as to which
method is the correct method for a production level environment. Thus, if
someone could shed some light on this topic, it would be most appreciated.
Thanks in advance,
-Conrad
-------------- next part --------------
An HTML attachment
2006 Feb 24
2
Rails apps in subfolders
Assuming I have a Rails application running in the root folder of my
domain. Now I want to put a clients'' app in a subfolder on that domain
for review (or at least it *should* look like a subfolder). Can this be
accomplished via .htaccess? It should not interfere with the Rails
routing in the root folder.
If .htaccess is the way, please help me out here, I suck at
mod_rewrite...
--