Displaying 20 results from an estimated 2000 matches similar to: "Models within Modules"
2005 May 12
26
performance update
I have made additional progress with regard to performance. My latest data:
configuration 1: r121.latest
configuration 2: r121p.latest
page c1 real c2 real c1 r/s c2 r/s c1/c2
/empty/index 6.75525 1.71983 148.0 581.5 3.93
/welcome/index 6.89044 1.89244 145.1 528.4 3.64
/rezept/index 4.99573
2005 Mar 02
3
uprgrade to 0.10: uninitialized constant Class::Object
Hi,
I installed rails 0.10 with ruby gem, and upgraded my application as
described at http://manuals.rubyonrails.com/read/book/15 .
Now, when accessing the action index of the controller rss_feed, I get
this error in the terminal when I started the server:
#<NameError: uninitialized constant Class::Object>
2006 Jan 29
3
Models within Modules
I have models within a module file and access them from my controller
with Module::Model syntax, but only get unitialized const errors. I even
tried require ''mymodule'', etc, no avail. The Prg
Google has ZERO help on this, and I can''t believe more people haven''t
run into this issue. What''s the deal?
Frustrated,
John
--
Posted via
2006 Jun 28
9
Rails Borked After 1.1.3 Install?
I installed 1.1.3 on my OS X Tiger machine and now I''m seeing very strange
results.
When hitting a controller action, I am told that perfectly valid methods are
not there:
NoMethodError (undefined method `find'' for VideoTrack:Module)
Huh? Here''s the code in question:
VideoTrack.find(:all, :conditions => "featured_video = 1", :order =>
2005 Mar 10
8
Login controller additions
I have added roles and roles_users table and updated the model so that
my users can have multiple roles.
("Admin" role does always have id = 1).
I have added these methods to my application controller.
<code>
helper_method :is_admin?
helper_method :is_user?
def is_admin?
if @session[''user'']
@session[''user''].roles.find(1)
2006 Mar 06
7
Set base url?
I have an application running on a Lighttpd instance which is proxied by an
Apache server. It seems to work fine but my urls are incorrect: all urls
reference / which is not where my application runs at the Apache server.
How do I set the base url of a Rails application?
My Apache has the following proxy rules:
ProxyPass /hieraki http://localhost:3001
ProxyPassReverse /hieraki
2005 Mar 31
4
Transactions
I cant seem to find much information apart from the basics on
transactions in rails. I have 5 nested transactions, and am performing
the following basic operations:
@whatever1.transaction do
@whatever2.transaction do
....
@whatever2.something = "foo"
@whatever1.something = "bar"
@whatever1.save
@whatever2.save
.....
end
end
((( I had tried using
2005 Mar 08
15
Rails 0.10.1and WEBrick
Doesn''t appear to work with WEBrick. Works find with Apache/FastCGI.
Something wrong in the way Rails is trying to process paths from the
WEBrick server. If I try to send in http://localhost:3000/recipes/new,
WEBrick is interpreting /new as my controller, instead of my action.
2006 Jun 27
25
1.1.3 available.
Hello,
DHH has just announced the release of Rails 1.1.3
http://weblog.rubyonrails.org/2006/6/27/rails-1-1-3-security-fix-and-minor-fixes
rails-1.1.3
activerecord-1.14.3
actionpack-1.12.2
actionmailer-1.2.2
actionwebservice-1.1.3
The announce without the repetition :)
"Rails 1.1.3: Security fix and minor fixes
Posted by David June 27, 2006 @ 08:07PM
We''ve found and fixed a
2005 Mar 10
10
Some Basic Questions
Sorry I can''t access IRC from work so I hope you don''t mind me asking my newbie
questions here:
1) I have the following code:
@post = Post.find(@params[''id''])
@comments = Comment.find_all "post_id = #@params[''id'']", "created_on ASC"
And I am have problems with the second line. I want to pass the id from my post
to the
2005 Mar 05
3
routes inconsistency?
Hello,
As a small excercise in learning rails, I''ve been porting a very
simple website from SSI to rails (yep, a bunch of static files that
were previously served with a tiny bit of SSI magic are now served by
a database-backed rails, it''s total overkill, I know). Part of the
reason is that I''m trying to move from apache to lighttpd, and
lighttpd''s SSI for
2005 Dec 19
2
prototype.js vs f-secyre
Hi all,
I''m working on my first Rails (ver 1.0) examples. My problem is F-Secure
virus protection software. It reported about "unknown virus" in
prototype.js when I tried to creat (usin rails) new application. As
result I got empty public/javascripts folder. Can anyone help with this
problem? (I can disable real time protection on mine computer, but same
problem will
2005 Mar 02
1
Defect question?
Hey guys,
Take a look at http://dev.rubyonrails.org/ticket/732. The essential
''problem'' is that Rails doesn''t support a module and a class both
named Customer. (::Customer, not in modules themselves)
Is this something that''s even possible with ruby? it looks like it
should be marked as wontfix? But as I''m a little new to ruby, I
figured
2005 Apr 16
1
Accessor not set
Hello!
I have a list of bands, and each band belongs to one genre:
class Band < ActiveRecord::Base
belongs_to :genre
end
class Genre < ActiveRecord::Base
has_many :bands
end
In the list.rhtml, when I do:
<% for band in @bands %>
<td><%=h band.genre.name%></td>
</tr>
<% end %>
it gives me: _undefined method `name'' for nil:NilClass
2005 Oct 24
2
config.action_mailer... ?
I''m trying to figure something out with the Initializer stuff in .14,
and I can''t tell if I''m missing something or if something was
overlooked..
What I want to do is something like this:
config.action_mailer.server_settings[:address] = ''192.168.40.5''
Prior to .14, I was setting it with:
ActionMailer::Base.server_settings[:address] =
2005 Mar 02
1
404 and NameError
Hi guys,
I was wondering if anyone knew a fix for this problem I have. I''ve
ported one of the apps I work with to Rails 0.10.0 to use Routes.
Everything works great, except for 404 pages.
The thing is that if I give a non existent path, I get the correct 404
error page back. However if I request a non existent file such as
test.php (in fact anything non existent that isn''t a
2005 Mar 02
3
App behaves differently on Apache and Webrick
When running on the Webrick server (script/server), my app works fine.
When running on Apache 2.0.52, I get the dreaded ''unitialized constant
Merge'' error. Merge is the name of my model, the controller is
MergesController.
The deadline looms, any help appreciated!
Thanks!
Regards,
JJ
2005 Aug 19
3
accessing DB result in template
hello,
I have the following in my controller
def totalmembers
@total = User.find_by_sql "SELECT COUNT(*) as count FROM users "
end
now inside my template how do i access the field "count" from the
query so i can print out the number of members ?
I tried everythign like <%= @total.count %> but nothing works.
thanks
adam
2006 Mar 06
4
Apache 2.x: Use fcgid or Mongrel?
Hi, There''s lots of stuff going on currently with choices of production
deployment environments. But I''m not clear on a few things as I need to
decide on a production setup where Apache is a given.
A recent thread (http://www.ruby-forum.com/topic/56590) seemed to favor
Apache 2 with mod_fcgid. And this is supported in articles such as:
2005 Jul 29
0
Fwd: Products and mod_rewrite
It appears this message bounced somehow, so I''m resending. Apologies
if it is a dup.
Begin forwarded message:
> From: Duane Johnson <duane.johnson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Date: July 29, 2005 8:59:30 AM MDT
> To: Steve Sloan <steve-2FdKsI0tZ45AfugRpC6u6w@public.gmane.org>, rails-1W37MKcQCpIf0INCOvqR/pqQE7yCjDx5@public.gmane.org
> Subject: Re: