Displaying 5 results from an estimated 5 matches for "client_control".
Did you mean:
clients'control
2006 Jan 30
5
Lookup from related tables
I have been working on this for 3 days and haven''t been able to solve
it.
I have 2 tables...
clients
belongs_to: case_managers
case_managers
has_many: clients
When entering new clients, I need to have some type of select box that
allows me to pick the case_manager (by name) so that the ''id'' field from
the case_manager table is inserted into clients.case_manager_id
2007 Dec 13
3
Realise a web service with ruby on rails.
...rvice_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 generated a controller client
/app/controller/client_controller.rb
class ClientController < ApplicationController
web_client_api :customer,
:soap,
"http://localhost:3000/customer/api"
def list
customer.listall.map do |id|
@customers = customer.listid(id)
end
end
end
But when...
2006 Jul 19
1
RoutingError -- but only for one controller
...nt.
2. Even in production mode, the other two controllers in my app work
perfectly. Plus, I haven''t touched anything in config or dispatch.fcgi.
So I don''t think it''s an Apache or fastcgi problem.
The last thing I did prior to the problem was to add a new action to my
client_controller and add the corresponding view.
Thanks in advance for any hints in the right direction.
A
--
Posted via http://www.ruby-forum.com/.
2008 Mar 26
2
Missing Method defined in controllers/application.rb
...lication.rb:
class ApplicationController < ActionController::Base
...
def datebalk!
# set regexp for datebalks generated attributes
c = /.*__dteblk/
# Remove datebalks generated attributes from params hash
delete_if { |k, v| c =~ k.to_s }
end
...
end
When I call this from client_controllers.rb in this fashion:
# need this to strip out observer attributes for datebalks plugin
@client = @entity.build_client(params[:client].datebalk!)
I get this exception:
undefined method `datebalk!'' for #<HashWithIndifferentAccess:0xb6c9276c>
RAILS_ROOT: /home/byrnejb/Sof...
2008 Mar 08
9
Validation error handling on related models
I have 2 models, entity and client. Entity has_one client and client
belongs_to entity.
Entity has attributes name and legal_name. Entity also has an unique
index on (lower(name)). The pKey for both is the conventional Rails id.
Client has a fKey constraint on entity_id and is indexed in entity_id.
In controllers/clients_controller.rb I have:
# GET /clients/new
# GET /clients/new.xml