search for: productcontroller

Displaying 8 results from an estimated 8 matches for "productcontroller".

Did you mean: productscontroller
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 the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonra...
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
2005 Jul 15
5
Nested Controllers
Hi there, I wondered if anybody had any experience with having nested controllers?For example, I''d like a hierarchy something like this: /product /product/list /product/detail /product/detail/category I can''t find any documentation on this, so any advice/experience anybody might have would prove useful. N.B. This is for a generator which builds Views and Controllers
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 May 31
5
Sharing code between some controllers? Staying DRY
...''t know how Rails will feel about them. Option 1: Can I create an intermediate controller class like the following? If so, are their pit falls to this method? class ApplicationController end class AdminController < ApplicationController private def redirect_to() end end class ProductController < AdminController end Option 2: I could create a flie in lib/ which contains the redirect_to() method and then mix it into each controller. This option doesn''t feel as good for some reason. Also I don''t know what code would need to be in my controller file to do this. Any i...
2006 Jul 23
2
REST controller with up and down for model that acts_as_list
...ucts 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 ProductController < ApplicationController def up Product.find(params[:id]).move_higher end def down Product.find(params[:id]).move_lower end end This doesn''t fit the the REST idea of only UPDATE for making changes. How do I rework this to be more REST friendly? Thanks, Peter
2007 Sep 02
17
A Proposal To Magically Remove ''params''
...;'t care if the user threw in an extraneous variable - one only cares about the variables we need to process the action. Instead of using params we could make actions more functional by taking advantage of this cool programming concept called ''arguments''. An example class ProductController def show(id) # GET /products/show?id=12 @product = Product.find(id) render end def index(page = 1) # GET /products?page=2 @products = Product.paginate_all(page) render end end Getting a parameter list for a method is rather difficult, but using zenspi...
2006 Apr 26
3
My GD2 is not working
...ler.rb:23:in `process!'' /home/virtual/site1/fst/var/www/html/imodesite/public/dispatch.fcgi:24 This error occured while loading the following files: application.rb application_helper.rb gd2 With GD 1.1, I got ======================================================== NameError in ProductController#product_image uninitialized constant SYM RAILS_ROOT: /home/virtual/site1/fst/var/www/html/imodesite/public/../config/.. Application Trace | Framework Trace | Full Trace /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in `const_missing'' /usr/l...