Displaying 20 results from an estimated 10000 matches similar to: "Controller Naming Question"
2006 Sep 06
4
Setting Product Env
When I am using my rails models in my worker class, it appears the
background worker class is always using development no matter what I do.
I set background.yml to production. I even have ENV[''RAILS_ENV''] ||=
''production uncommented in environment.rb. I don''t have the development
db even created on my production box, so not sure where it is getting
development
2006 May 03
7
Business Logic and where to place with rails
I am having an issue of deciding where I should put the business code
for example the more complex code coming off the controller. Right now,
I am just thinking to put it in the ''lib'' directory and the do something
along these lines:
require_dependency "system_process"
class SystemMessageController < ApplicationController
include SystemProcess
...
...
Where
2006 May 04
22
Should controllers be "smart"?
I''m working on a small project with a friend, and one of the things we
needed to do was send off an email whenever someone signs up an
account. His implementation was pretty simple - throw a
deliver_welcome call inside the controller after the signup. I''m sure
that this is a pretty common thing to do.
The problem, in my mind, was that the app now became tied to two
places -
2006 Jun 08
3
MVC and Pagination
Just wondering how to best integrate with pagination and still stick to
MVC...
Say I have a Post model that has a published attribute. I want to show
all the recent published posts on a page.
My first instinct is to create a method in the Post model called recent
that does the find with proper conditions and order, but the problem I
have is how do I use that with pagination (which definitely
2006 Apr 19
4
RJS replace_html auto-closing tags
I''m using the following RJS template to spit out a div containing a
list of projects:
page.replace_html ''results'', ''<div>''
@projects.each do |p|
page.insert_html :bottom, ''results'', p.name + "<br/>"
end
page.insert_html :bottom, ''searchresults'', ''</div>''
page.show
2006 Mar 16
4
problems with latest and greatest ?
I just did the following:
1) checked out latest rails from svn.
2) built project using the /bin/rails with the latest rails binary.
3) did a "rake freeze_edge" within the project
Now, script/server is failing
===========================
./script/../config/../vendor/rails/railties/lib/commands/../tasks/tmp.rake:1:
undefined method `namespace'' for #<Object:0x401ce970>
2006 Apr 19
2
Credit Card Processing / Merchant Account
Hi All,
Has anyone implemented a credit card processing / merchant account
system using Rails? I know that there is a ''payment'' gem that is
supposed to integrate with the Authorize.net gateway, but I''m wondering
if that is the best (and only) solution out there. Are there any other
recommended solutions from Rails programmers out there?
Thanks in advance for the
2006 Mar 09
2
Edge Rails Webrick Problem
Can anyone help me with the following error while trying to start
webrick on edge rails? Was working last week, but recent updates are
causing the following error. Is there something in my existing rails
dir that I might need to update?
Thanks in advance for any help.
./script/../config/../vendor/rails/activesupport/lib/active_support/core
_ext/kernel/agnostics.rb:7:in ``'': Exec
2006 Jul 18
4
Multiple Layouts - Single Controller
How do I do multiple layouts for a single controller:
I am aware I can do... render(:layout =>''mylayout'') for individual
actions, however this becomes a multiple render problem.
I tried this...
layout "mylayout", :except => [:myaction, :myotheraction]
layout "myotherlayout", :only => [:myaction, :myotheraction]
However that doesn''t
2006 Apr 19
9
Initial load time when periodically_call_remote
When I do periodically_call_remote with e.g. :frequency => 30
after initial page load I have to wait 30 seconds until this partial
renders first time. Does anybody know how to make ROR to render partial
on web page load, and then start periodic calls every 30 seconds? I
tried to put
<div id=''mydiv''><%= render(:partial, :action=>''myaction'')
2006 Feb 23
5
Q: Where to put a periodic updater?
Hello,
I need to put a script in place for updating a local database with a
remote resource periodically. It should be started alongside the
server (or inside it, whatever) and be run as long as the server
running my rails app is up an running.
Any thoughts on how to accomplish this?
I have thought of editing the environment.rb file and placing the call
to the script trigger there, but I wonder
2006 Mar 23
7
Fixtures just Do Not Work for Me
Hello,
I have been struggling to get fixtures to work here with no success.
They just Do Not Work For Me (tm).
I have created a model named Headline with the `generate'' script and
modified the test/fixtumes/headlines.yml as follows
----------
gita:
id: 1
author: raulseixas
title: gita
happened_at: 2005-01-01 00:00:00
description: gita
This is the CD reissue of
2006 Mar 16
6
File Auditing with rails - File I/O issue
Hey Folks,
I''ve written a script to generate a list of all files on a machine,
then zip the results. ?I''m going to stick a web front end on it, and use it to audit some file servers. The problem is that the ZIP compression/decompression isn''t working,
but its not what you might think. ?The script completes, but seems to
not actually write anything.
Here is a short
2006 Apr 15
2
Using a Button to render partial
Is there a way to render a partial using a button? Basically in a
content div I want the user to launch a new sub content item in the same
div by clicking a button.
Any help appreciated.
Loving rails more and more everyday.
--
Posted via http://www.ruby-forum.com/.
2006 May 31
13
What are controller modules *for*?
I am aware that controllers can be placed in modules:
ruby script/generate controller modulename/controllername
But what does this buy me? Is it just a way of ensuring that my source
code is nicely arranged, or can I use the fact that a set of controllers
are all within a particular model to implement functionality common to
all of those controllers?
Why am I asking?
The app
2006 Mar 14
6
Framework
hello all,
I need any framework that generate models using the database
structure....
Anyone knows if have this framework????
Thank''s
--
Posted via http://www.ruby-forum.com/.
2006 May 03
12
Mongrel + RubyOnRails + FileUploads = Problems?
I really like the idea of using Mongrel. But reading the FAQ, I noticed
something that might be an issue. It stated:
"Ruby on Rails is not thread safe so there is a synchronized block
around the calls to Dispatcher.dispatch. This means that everything is
threaded right before and right after Rails runs. While Rails is running
there is only one controller in operation at a time."
So
2006 Mar 28
1
Efficiently convert this SQL statement to ActiveRecord loop
Hey Folks,
My app compares the last known set of files located on a series of
servers against a current snapshot for auditing purposes. Its working
really well, and I''ll open source it when its complete!
Here''s my current issue (and forgive me, I started life as a DBA and I
constantly want to revert to connection.execute.)
The tables to store my objects are
2006 Mar 17
7
OT: Subversion folder cleanup
How do you clean up your app folder to place onto the server? I want to
get rid of all the .svn stuff.
Seth Buntin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060317/cc81d9f7/attachment.html
2006 Jun 15
8
Markaby Installation Issues
Ok,
So I followed the directions.. I did a ''gem install markaby'' (which sounds
like its enough to get me going for rails), but I wasn''t sure, so I tried to
install the plugin as well.
Plugin installation fails looking for a file:
Script/plugin install http://code.whytheluckystiff.net/svn/markaby/trunk
Outputs this error:
+ ./trunk/svnindex.xsl