search for: cbruce

Displaying 20 results from an estimated 21 matches for "cbruce".

Did you mean: bruce
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 Mar 14
5
Controller Naming Question
Is it possible to have controllers named the following? /admin /admin/user If not, is there some way to get it to work with routes? I want to have some actions at the url /admin/<action> and some at /admin/user/<action> (obviously in admin/user controller). Thanks!!!
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 Jun 07
0
Apache/Routing Help (Can I have apache route to specific controller)
I am trying to integrate a rails application with Zope. My goal is to slowly replace parts of the Zope site with Rails while trying to maintain the original urls (where possible). I am using Apache 1.3 with FCGI. Right now my set up looks sort of like the following: Alias /rails/ /rails-app/public/ RewriteRule ^/rails/ - [L] RewriteRule ^/(.*) http://zope-server/$1 [P,L] I am using the
2006 Jun 07
0
Apache/Routing Help (Can I have apache route to specific con
I am trying to integrate a rails application with Zope. My goal is to slowly replace parts of the Zope site with Rails while trying to maintain the original urls (where possible). I am using Apache 1.3 with FCGI. Right now my set up looks sort of like the following: Alias /rails/ /rails-app/public/ RewriteRule ^/rails/ - [L] RewriteRule ^/(.*) http://zope-server/$1 [P,L] I am using the
2006 Sep 07
1
Monitor Script
I was thinking it would be nice to have an extra script to monitor the process and restart it if it wasn''t running. Basically a watchdog script that you can run as a cron job if you want. I can put one together if someone hasn''t already? Chris
2006 Jun 08
1
Can I route directly to Controller?
I am trying to integrate a rails application with Zope. My goal is to slowly replace parts of the Zope site with Rails while trying to maintain the original urls (where possible). I am using Apache 1.3 with FCGI. Right now my set up looks sort of like the following: Alias /rails/ /rails-app/public/ RewriteRule ^/rails/ - [L] RewriteRule ^/(.*) http://zope-server/$1 [P,L] I am using the
2006 Jun 13
0
Custom Active Record Callbacks?
Is it possible to create a custom callback for my active record model? For example, if I have a model with an approve method, I would like a callback for that method so that I can have my observer send out email notifications when the model is approved. Any ideas on the best way to do this? Should I be trying to use a custom callback? Thanks in advance!
2006 May 04
1
Re: How do I identify the initiating View from within aHelper?
Lindsay, Wouldn''t you want to use a component for this? I know components seem to be out of favor, but they seem like a perfect fit for this very thing. You could then go like: <%= render_component :controller => ''sidebar'', :action => ''home_menu'' %> The :action parameter could even be more dynamic based on your own needs. Maybe someone
2006 May 23
2
has_many :through extra domain model question
If I have a model called Newsletter with: has_many :subscribers, :through => :subscriptions and wanted to list all the subscribers, but show what level their subscriptions was (level is in subscriptions table), how would I best do that? Do I have to use my own select to get what I want or are the attributes from subscriptions available to me through the join somehow (I am suspecting not)?
2006 Mar 10
0
Form Array Elements Handling
What is the proper "Rails Way" to handle arrays of objects on a form using checkboxes to select one or more? For example, I would like to assign one or more persons to task. In my view, I loop through each person, spitting out a checkbox. When the form is submitted back to the controller, I would like to iterate through the checked persons. I know rails has some ways of dealing with
2006 Mar 13
2
Can Rails handle PUT requests??
Can rails handle PUT requests with Apache 1.3 and FCGI? If not, what would have to be done to make it work? I would like to be able allow ruby to handle file uploads with resume-able abilities. Thanks
2006 Mar 14
0
Unbuffered Output?
Is it possible to send unbuffered output to client browser from a controller and/or view? If so, how? Thanks!!