search for: customercontrol

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

Did you mean: customerscontrol
2009 Feb 18
3
wrong number of arguments (1 for 0)
Hello, I am new to ruby on rails. When I tried to create a session I am getting an error, ''wrong number of arguments (1 for 0)'', in my controller. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ArgumentError in CustomerController#add_to_cart wrong number of arguments (1 for 0) RAILS_ROOT: /project/bob_shopping Application Trace | Framework Trace | Full Trace app/controllers/customer_controller.rb:36:in `session'' app/controllers/customer_controller.rb:36:in `add_to_cart'' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
2006 Apr 18
2
Connecting to multiple databases with multiple database users
...member the old connection and manually change it to the webadmin connection by calling establish_connection. Perform the "webadmin-only" operations. Change the connection back to the old one 2) Same scenario as 1 but vice versa (i.e. defaulting to webadmin and changing to customer in the CustomerController) 3) Create the model classes two times, one time with a superclass using a webadmin connection, and one time with a superclass using a customer connection. I think it would at least be necessary to give rails information about the underlying table name since we need names different from the rai...
2006 May 25
7
Grouping controllers
I''m grouping controllers to avoid cluttering the top-level namespace. First, I used script/generate Admin::Customers new edit show list and then I used script/generate Admin::Providers new edit show list. The generator created the subfolders correctly: I have an admin folder and inside there''s customer_controller.rb and provider_controller.rb. I have the same structure in
2006 Nov 21
2
before_filter in actionwebservice controller using direct dispatching
...following error. The authorize method is in application.rb. Works fine when it''s not a web service api. Should I be using before_invocation instead even with direct dispatching mode? Or can I not have the authorize method in application.rb? undefined method `authorize'' for #<CustomerController:0x8ee54e0> class CustomerController < ActionController::Base after_filter :end_session before_filter :authorize web_service_dispatching_mode :direct web_service_scaffold :invoke web_service_api CustomerApi end Chris --~--~---------~--~----~------------~-------~--~----~ You r...
2006 May 10
8
dynamic setting of username and password in database.yml
Hello I''ve now read a lot about application-level authentication in Rails, but I need to do database-level authentication. The reason is that my database needs to have the current_user (database current_user, not current_user defined in an ActiveRecord Model) set to execute triggers for automatically updating audit tables. So it is not enough to have a session check against a User
2005 Mar 02
1
Defect question?
Hey guys, Take a look at http://dev.rubyonrails.org/ticket/732. The essential ''problem'' is that Rails doesn''t support a module and a class both named Customer. (::Customer, not in modules themselves) Is this something that''s even possible with ruby? it looks like it should be marked as wontfix? But as I''m a little new to ruby, I figured
2007 Aug 20
0
FormBuilder in rjs
...serve_field :customer_state_id, :url => search_cities_url, :with => ''search[state_id]'' %> <.div id=''state_div''><%= render :partial => ''city/list'', :object => [], :locals => { :f => f } %> <% end %> class CustomerController... def create @customer = Customer.create params[:customer] # => { :state_id => X, :city_id => Y } ... end end Partial: /city/_list.rhtml City: <%= f.collection_select :city_id, list, ''id'', ''name'' %> class CityController......
2007 Dec 13
3
Realise a web service with ruby on rails.
...stomer, a web_service customer. In the file /app/apis/customer_api.rb class CustomerApi < ActionWebService::API::Base api_method :listid, :expects => [:int], :returns => [Customer] api_method :listall, :returns => [[:int]] In the file /app/controller/customer_controller.rb class CustomerController < ApplicationController wsdl_service_name ''Customer'' web_service_scaffold :invoke def listid(id) Customer.find(id) end def listall Customer.find(:all).map{ |customer| customer.id } end end I finished my server web_service. I realised a client I genera...