search for: product_control

Displaying 5 results from an estimated 5 matches for "product_control".

2008 Jun 07
5
Can create record but can not update it => has_many through
...I have a problem using has_many through association. I can create a product without problem, but when i edit it, i got this NoMethodError: undefined method `reciters='' for #<Product:0xb71a77e8> Did i miss something to code? I provided the codes below. Please help Thanks, Dida product_controller.rb ====================== def create @product = Product.new(params[:product]) if @product.save unless params[:reciters].blank? @product.reciters << Qori.find(params[:reciters]) end flash[:notice] = ''New product successfully created.''...
2006 Apr 13
8
Controller paths
Hi there. Suppose I create some controllers like ruby script/generate controller Admin::product add remove ruby script/generate controller Admin::user add remove ruby script/generate controller Login login logout the directory structure will be app/controllers/admin/product_controller.rb app/controllers/admin/user_controller.rb app/controllers/login_controller.rb Now suppose I need some links with link_to from the product and user controller to the login controller. Does I need to use some paths like link_to "Logout", :controller => "../login", :acti...
2006 Apr 26
3
My GD2 is not working
...ib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:133:in `const_missing'' /usr/local/lib/ruby/gems/1.8/gems/gd2-1.1/lib/gd2/image.rb:120:in `load'' #{RAILS_ROOT}/app/helpers/application_helper.rb:46:in `resize_image'' #{RAILS_ROOT}/app/controllers/product_controller.rb:387:in `draw_image_for'' #{RAILS_ROOT}/app/controllers/product_controller.rb:149:in `product_image'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in `const_missing'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3....
2006 Jan 04
7
recongizing the current controller in views
alright i am doing a simple self blog in ruby. Now iw ant to be able to determine which controller action i am in inside _form.rhtml. So if i am in new or the creation control than i want to insert the text box for topics else i want to display the topic base on id. (i could do those already, i just need help finding the right if statement.. something like (if currentpage ==
2006 Apr 20
8
generate scaffold not generating views
Hi! Sorry for the newbie question... I''m following the depot example in AgileWebDevelopmentWithRails. Stangelly, generating scaffolding using the command (page 53): ./script/generate scaffold Product Admin does not generate any .rhtml file, but just: exists app/controllers/ exists app/helpers/ exists app/views/admin exists test/functional/