Displaying 20 results from an estimated 10000 matches similar to: "Controller and action design patterns"
2005 Dec 15
6
Code from famous RoR video?
Does anyone know where I could get text file with the code from the
famous video where they create a Weblog in 15 minutes -- The one that''s
here: href="http://rubyonrails.com/screencasts?
(I can''t just watch it here at work, and I''d like to avoid having to
re-type everything in any case.)
Thanks!
--
Posted via http://www.ruby-forum.com/.
2007 Feb 09
3
Re: URL issues
hello...
On 2/8/07, cdvr <codecraig-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> Hi,
> I watched the rails screencast on creating a blog in 15 minutes.
> I followed along got it working on my home PC and I then uploaded it
> to my web host. So I have,
>
> /home/<username>/blog
>
> I had to change some config in the blog app (i.e. production
2006 Feb 27
4
(resend - sorry!) Which controllers?
Hello,
I have recently started learning RoR. I think it''s _fantastic_. I am
absolutely blown away.
OK, this is to prepare you to my idiotic question. Hopefully, I won''t
be stoned.
I am designing a simple application, where users can register, and:
* Publish a photo album
* Publish a simple blog with comments
* Determine their list of friends and foes
The application will
2005 Jul 07
2
raid5 crash
hi,
after we switch our servers from centos-3 to centos-4 (aka. rhel-4) one
of our server always crash once a week without any oops. this happneds
with both the normal kernel-2.6.9-11.EL and
kernel-2.6.9-11.106.unsupported. after we change the motherboard, the
raid contorller and the cables too we still got it. finally we start
netdump and last but not least yesterday we got a crash log and a
2006 Jan 30
14
RoR admin system
I''m preety new at RoR (and programming), I tried a few tutorials, and
really like the RoR simplicity, but my knowledge of the framework still
isn''t very good (to be true, i understand the basics, but not everything
that''s in the tutorials).
But still I''d like to create a website which has:
- front end interface (with no edit functions)
- admin interface
2006 Apr 05
13
scaffold misuse?
Running ruby script/generate scaffold Product Admin
is a wonderful way to set up well, exactly what it says, a scaffold.
My problem is that I have several other tables that are linked,
through foreign keys, to the Product table. Say an "authors" table.
Now when I go enter a new product, a book, I want the application to
provide a drop down list of authors generated from the records in
2006 Jul 28
2
change url based on account name
Hi,
Is this possible
Can I specify a url ie
http://localhost/AccountName/:contorller/:action/:id
Where AccountName is should be a userName, which will lookup a siteId in
the database?
Whats the best way of going about this, is there somthing in the
routes.rb file I can change to get the account name into a variable?
Thanks for your help
jon
--
Posted via http://www.ruby-forum.com/.
2006 Feb 16
9
calling a controller/action from another controller
Hi,
Is there a way to call a controller/action pair from another controller
as well as render the view for that pair? I have tried using "render
''ctrl/action''" and that works, but the controller code isn''t called
(only the view is rendered). A redirect_to isn''t desirable either as I
want the resulting content to be rendered in the current
2006 Jan 29
2
GetText and rjs templates?
hi,
is it possible that gettext don''t work with rjs templates?
i''ve just tried this simple example
blog_controller.rb :
class BlogController < ApplicationController
def index
end
def dosomething
end
end
index.rhtml :
<html>
<head>
<%= javascript_include_tag :defaults %>
</head>
<body>
<div id="test">Some text to change
2006 Apr 03
8
Layout problem
Hi,
I am creating a blog to learn ruby on rails. The blog.rhtml in the
layout folder has a the following code
<td width=150 valign="top">This is the left menu</td>
<td width=600 valign="top"><%= @content_for_layout %></td>
<td width=150 valign ="top"><%= render :partial => "categorylist",
:collection =>
2006 Jun 08
1
Action Controller Error - unitialized constant
I''ve been using Locomotive on a Mac mini for months creating ROR apps.
Everything was working fine until Wednesday. For any new scaffold code that I
generate I''m getting a message stating "Unititialized Constant" for the name of
the scaffold code that I just generated.
The stack trace ends with the lines:
This error occured while loading the following files:
2009 Dec 09
5
[LLVMdev] [PATCH] increase the max number of physical registers
On Dec 8, 2009, at 3:31 PM, Jakob Stoklund Olesen wrote:
>
> On Dec 8, 2009, at 11:33 AM, Evan Cheng wrote:
>
>> This caused a massive slow down to post-ra scheduler (llc -O3 on x86, -O2 on ARM). I'm going to revert it for now until it has been addressed.
>
> Probably caused by this member:
>
> /// KillIndices - The index of the most recent kill (proceding
2007 Aug 19
3
fastcgi issue on production
I just deployed my rails app to my production server. It''s all working
locally, but when I switched it over to the production server (at
dreamhost) I get this error:
# Logfile created on Sun Aug 19 15:22:48 -0700 2007 by logger.rb/
1.5.2.9
[19/Aug/2007:15:22:48 :: 1841] starting
[19/Aug/2007:15:22:48 :: 1841] Dispatcher failed to catch: You have a
nil object when you didn''t
2006 May 26
8
What is the different between Scaffold / Controller / Model
Hi everyone
I am learning RoR now and got a question.
What is the different between using ruby script/generate <Table>
Scaffold / Controller / Model?
Thank you
Victor
--
Posted via http://www.ruby-forum.com/.
2007 May 24
4
design patterns
Hi everyone
I''m Maximiliano Guzenski from Brazil and I am programing on ruby on rails
only a couple of months.
I read a lot of books and articles about it but I could not clarify some
doubts about design patterns:
1) Is it really good put some sql command on controller? because all
articles that I see use sql into controllers, like:
# my controller
@categories = Category.find
2009 Dec 08
2
[LLVMdev] [PATCH] increase the max number of physical registers
This caused a massive slow down to post-ra scheduler (llc -O3 on x86, -O2 on ARM). I'm going to revert it for now until it has been addressed.
Evan
On Dec 7, 2009, at 11:39 AM, Dan Gohman wrote:
>
> On Dec 7, 2009, at 11:15 AM, Pekka Jääskeläinen wrote:
>
>> Here's the actual patch, sorry ;)
>
> Applied in r90789.
>
> Dan
>
>
>
2006 Jan 31
2
Need advice on RoR app design
Fellow Railers,
Is there anything, anywhere, that I can read that discusses overall RoR
app design? I have the Agile RoR book, which is great for learning the
details of RoR, but unfortunately doesn''t cover the overall issue of
creating a large, complex RoR app.
My staff and I are still in the process of getting up to speed on Ruby
and RoR, but we also need to begin thinking about
2006 Apr 11
5
RJS adds comment but doesn''t update form
Hi,
When a user adds a comment i want to add the comment to the end of the
comments list using ajax so there is no full page refresh. The code i
have below adds the comment to the database but doesn''t update the
comments div with the new comment.
Can anyone help? This is my first use of rjs templates and i have read
http://www.codyfauser.com/articles/2005/11/20/rails-rjs-templates
2006 Jun 14
1
page caching with custom routes
hi ,
I''m having problems with expire_page with custom routes
i''ll show some code
blog_controller
---------------
def clear_cache_rss_artikels
expire_page url_for(:controller => "xml",:action => "rss_artikels")
end
this is called when a new article is posted or edited or destroyed
xml_controller
---------------
class XmlController <
2006 Feb 14
1
Another HABTM Question
Hi there,
I have a question on what would be the best way to save a HABTM model.
A posting habtm categories, and a category habtm postings.
class Category < ActiveRecord::Base
has_and_belongs_to_many :postings
end
class Posting < ActiveRecord::Base
has_and_belongs_to_many :categories
end
In my blog_controller, where the actual posting is saved, is where I
think I''m