similar to: Nested Controllers

Displaying 20 results from an estimated 1000 matches similar to: "Nested Controllers"

2008 Mar 03
3
Admin and standard controllers RESTFully
Hello. I will appreciate the opinion. What is the standard way of separating admin functions from normal- user functions? before_filter in one controller? Use two controllers, i.e. ProductController and Admin/ ProductController? I want to use map.resources so RESTFul would be better. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to
2006 May 31
5
Sharing code between some controllers? Staying DRY
Hi, I have four controllers: one for the store front and three for the store admin. In each controller I have copied and pasted exactly the same code. It is a method called redirect_to() to override Action Controller''s redirect_to(). Copy and paste is bad. I can think of two options but I don''t know how Rails will feel about them. Option 1: Can I create an intermediate
2011 Sep 21
5
problem with submit button in rails 3
hi, i am using <%= s.submit ''Product save'' %> when i click it, following error appears " Routing Error uninitialized constant ProductsController" could any one provide me solution ? thanks, -pab -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send
2006 Mar 24
1
Multiple table relationships
Hello, I''m just starting out with some Rails development and have the following table structure. I understand how to do a two table has many join but I actually need to relate a third table. Here is my structure: components id name updated_at elements id name updated_at element_types id name updated_at components_elements component_id element_id
2006 Apr 24
3
quick q on script/generate scaffold
I want a scaffold to manager both products and users. To get the products scaffold I used script/generate scaffold Product Admin if I use, script/generate scaffold User Admin will it overwrite my product admin controller? Would I be better off doing script/generate scaffold User User_Admin or something? -- Posted via http://www.ruby-forum.com/.
2006 Feb 13
2
categories and admin/categories - different controllers and templates?
Is there some way to have these two sets of URLs use totally different controllers and templates? categories/list categories/show/1 admin/categories/list admin/categories/edit/1 admin/categories/destroy/1 admin/categories/update/1 Besides, of course, using different controller names ;). The first URL is publicly accessible, while the second contains admin functions. Also, with the second,
2005 Aug 09
12
Eclipse with RDT
Has anyone used Eclipse with RDT (http://wiki.rubyonrails.com/rails/show/RubyDevelopmentTools)? I have never used Eclipse. Would it be worth my time to setup Eclipse with RDT to create my first rails project?
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 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
2005 Mar 28
2
using login_generator and the Cookbook tutorial
Hi All, I''ve been fooling around with the login_generator and the rolling with ruby on rails demo, but I''m jiggered if I can get the two to work together. I''ve managed to get everything installed ok, and have created the db and tables, etc. I''ve been using ruby script\generate login Recipe, and I can either the get the basic tutorial to work, or get the
2008 Jan 04
6
Ajax.Request: onFailure vs. onException
Hello All, I''m trying to capture the exception message that my server application is providing in response to my Ajax.Request. However, I''m confused as to when onFailure is fired vs. onException. The onException handler has access to the javascript exception object and I''d understood that it was only called when the dispatch fails. Not sure what exactly that means
2010 Feb 19
3
Hooking validates
I want to hook the validation routines so that I can flag html labels and change their color to better indicate which fields need to be corrected in a form. Is there a way to do this conveniently and/or conventionally? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this
2005 May 27
10
Help wanted notices
Hi folks, I''ve added a couple of ''help wanted'' ads to our SourceForge project. You can see them at http://sourceforge.net/people/?group_id=22587 I''ll add more as i have the opportunity. If you can think of other jobs we need to assign, please let me know. -- Paul <http://paulgear.webhop.net> -- Did you know? Using accepted quoting conventions makes
2005 Dec 15
10
.rpdf ?
I haven''t delved into the wonderful world of PDF::Writer yet, nor have I run across a need.. but I just had an idea I wanted to throw out there how hard would it be to create a .rpdf template plugin for rails? could be neat ;]
2006 Jul 23
2
REST controller with up and down for model that acts_as_list
Hi, I have the following models class Department < ActiveRecord::Base has_many :products end class Product < ActiveRecord::Base belongs_to :department acts_as_list :scope => :department_id'' end When I look at a list of products for a particular department I have up and down buttons to re-order the products. Currently my controller is something like this class
2010 Jun 21
9
[BUG] Segmentation fault
First of all, I use RVM and I installed ruby-1.9.2-head, which I used to create a new rails3 gemset. Then I changed to that gemset with rvm use 1.9.2-head@rails3 and I ran bundle install over the following Gemfile: source ''http://rubygems.org'' gem ''rails'', ''3.0.0.beta4'' gem ''sqlite3-ruby'', :require =>
2006 Apr 14
1
[OT] Serving Multiple Stylesheets
I was wondering whether there is unbearable overhead involved in breaking css into multiple stylesheets? I''m running lighttpd, and the following article discusses why one might want to do that: http://justinfrench.com/?id=141 My CSS is beginning to get a bit lumpy to digest in one glance and the article(s) seem to make a cogent argument for separating functional elements out. I just
2005 Jun 26
4
calling controller and caching from a sweeper class
[cross-posting to rails and typo lists] Hi, I''m tinkering with the code for typo, a rails-based blog engine. Typo has an XmlController with actions "rss" and "atom" which generate feed.xml files, and it uses a caches_page declaration to cache the files that get generated by those actions. It also has a Sweeper (Observer) class that expires those cached files when a
2006 Apr 29
2
Streaming to/from MySQL
Hi. When I upload a 10Mb file (from my browser) to my Rails app, a Tempfile object gets created on the server. When the contents gets written to the database, it''s a simple INSERT, so basically the data is read to memory and then inserted into MySQL. How come the data is not streamed to the DB so we avoid the memory issue? Is this a short coming of ActiveRecord or the MySQL/Ruby
2006 Feb 06
3
Typo download during site migration
Is there a deep link still active to download Typo while http://typo.leetsoft.com/ moves to its new home? Thanks, Zack -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060206/9034c40f/attachment.html