Displaying 20 results from an estimated 20000 matches similar to: "Controller methods"
2005 Dec 25
4
Rails + SOAP ?
Hello-
I have a Rails web app that is database-centric (go figure). What I
would like to do is expose certain parts of this database to an
application running on a Windows box (or whatever). For the moment,
let''s consider the read-only case, but authentication will be required.
Is SOAP what would be used for something like this? Are there better
alternatives?
The existing
2006 Apr 10
4
Best way to propogate model rules to controller?
Hey everybody,
I''ve got a model that represents kind of a turn-based games. Certain
actions can only be made unders certain conditions. For simplicity,
we''ll say that the only condition for a particular action is that the
weekday be Tuesday.
def add_vote
raise ''You cannot vote today'' unless Date.today.wday == 2
...
end
In my controller I want to show a
2006 Apr 24
12
Design Decisions
Hi All,
I am doing some research on how people start with their Rails app.
What design decisions are made and how is it build.
For example:
- do you use scaffolding and go from there? Or do you create everything
from scratch?
- are you using multiple controllers? Or do you put everything in one?
- do you use migrate?
- how do you use migrate? Do you call migrate your self or do you use
the
2006 Feb 10
7
convert rails object to javascript variables
Am i a total idiot to try and parse out a rails object for javascript
in this way?
<%
for i in interface_items[0].attributes
%>
var <%= i[0] %> = "<%=h( i[1] )%>"
<%
end
%>
Am I missing something really obvious?
Thanks,
Mark
--
--------------------------------------------------------------------
I am Mark Daggett and I approve this message.
2006 Mar 16
23
AJAX on Mobile Internet Explorer
Hi!
I try to get AJAX running on a mobile Windows Mobile 5.0 based device
and failed. There should be a JavaScript support but nothing happens.
Have any of you experience with the rails javascripts on a this platform
or are there any hints, documentation on the net?
tia,
--
Daniel V?lkerts
Protected by Anti Pesto.
2006 Apr 30
82
Mongrel 3.15, Ubuntu and Park place (S3)
Hello. I installed under Ubuntu (Dapper) Park Place. I followed the
instructions given at the RedHanded site. I get the following mongrel
error when launching the application:
** Please login in with `admin'' and password `pass@word1''
** You should change the default password or delete the admin at
soonest chance!/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.5/lib/mongrel.rb:584:in
2006 Jan 26
3
Calling a SOAP service from within a Rails controller
The following works fine as a standalone ruby program:
**********************************************************************************************
t = Time.now
starter = Time.local(t.year,t.mon, t.day) + (24 *3600)
ender = starter + 7 * 24 *3600
lat = 40.352039
lon = -74.191961
require ''soap/wsdlDriver''
params = {:maxt => false, :mint => false, :temp => true, :dew
2008 May 22
3
SOAP client in Ruby/Rails
Hi all. I have a need to build a SOAP client using Ruby and Rails. I''m
accessing a document/literal style SOAP service. I''ve been poring over
documentation (well, there really doesn''t seem to be any, so that''s a
little misleading), blog posts, and outdated tutorials all day, and I
still don''t really have anywhere to begin. Every tutorial seems to
have a
2006 Feb 21
3
AJAX sub-list
In the new / edit screen for an "item" I''d like to be able to add/remove
"sub-items"
on pressing an add button below the "sub-items" a bit of a form shows up
with the html looking something like:
<div id="uniqueid">
<!-- label etc here -->
<input type="text" id="sub_items[]" name="sub_items[]"
2007 Dec 13
3
Realise a web service with ruby on rails.
Hi ,
I want realize a web service with rails, but it''s the response it''s
very slow. I want only saw all element present in my base.
I did a base Customers (with element like id, name, phone,...). I
added two elements.
I did a model customer, a web_service customer.
In the file /app/apis/customer_api.rb
class CustomerApi < ActionWebService::API::Base
api_method :listid,
2006 Feb 20
3
Trouble connecting to a Rails SOAP web service with a simple Ruby client
Hi,
The code for my Rails webservice is below. It working just fine
through the Rails web service scaffold invoke
http://localhost:3000/ProductBackend/invoke
I''m trying to write a plain ruby command line client to access the webservice.
require ''soap/rpc/driver''
proxy = SOAP::RPC::Driver.new("http://localhost:3000/product_backend",
2006 Feb 14
22
Teaching Models to Render Themselves in the Controller
I am trying to teach my models how to render themselves, i.e.
<%= my_model_object.render() %>
Let me explain my reasoning and proposed method before this gets shot
down as anti-MVC.
Let''s say I am writing a contact-management application. I have a
class Contact. I will need to display this class all over the
application. My first choice is to use a partial.
Now I can
2006 Aug 07
5
Store SOAP::RPC::Driver in user session throws TypeError
Hi All
I have a
requirement to consume a 3rd party web service from my Rails
application. I am doing this
in my action
require ''soap/wsdlDriver''
factory = SOAP::WSDLDriverFactory.new(TRANSIDIOM_WSDL_URL)
soap = factory.create_rpc_driver
soap.wiredump_file_base="#{RAILS_ROOT}/log/transidiom.log"
param = %(<Request
2006 May 02
1
SOAP client not seeing all of my AWS service methods
Hi all,
Ruby 1.8.4
Rails 1.1.2
I''m a newb when it comes to SOAP, but I thought I''d give it a shot. I
have several web services defined. However, when I try to connect with
a SOAP client it seems the client is only picking up one of the
services, called Hardware.
require ''soap/wsdlDriver''
wsdl_url =
2005 Dec 25
2
SOAP Client Connections
I''m trying to connect to a SOAP interface using Rails and I''m running
into a snag. I''m relatively new to Rails at this point and am in the
very beginning stages of understanding how the system works. Currently
I''m running into a error that looks like this:
--------------------------------------------
Missing API definition file in apis/amazon_api.rb
2006 May 01
2
Find by time?
I''m trying to find events created after an initial date. I''m sure it''s
something obvious, but I''m not sure why this isn''t working:
def self.find_recent
find(:all, :conditions=>"created_at > #{Time.local(2006, 4, 27, 22, 0, 0)}")
end
Time for more caffeine for me...
2006 May 19
1
Strange error when testing layered web service
Hi all,
Ruby 1.8.4
Rails 1.1.2
1) Error:
test_find_hardware_by_id(HardwareControllerApiTest):
ArgumentError: illegal refid http://test.host/
c:/ruby/lib/ruby/1.8/soap/baseData.rb:166:in `decode''
c:/ruby/lib/ruby/1.8/soap/encodingstyle/soapHandler.rb:153:in
`decode_tag''
c:/ruby/lib/ruby/1.8/soap/parser.rb:179:in `decode_tag''
2006 May 01
3
Using Classes in Rails
I am a beginner so please excuse me, if i am doing something totally
wrong.
I have created a class using "wsdl2ruby.rb" and here is what it looks
like:
class ServiceSoap < ::SOAP::RPC::Driver
DefaultEndpointUrl =
"http://balrog/services/SearchWorker/service.asmx"
MappingRegistry = ::SOAP::Mapping::Registry.new
Methods = [
...
--
Posted via
2006 Apr 02
6
Neat style trick
Not terribly exciting, but I was happy to think of it.
I needed a div with a fixed height that could vary depending on page
content.
So I did this:
<div class="listcntnr" style="height: <%= @users.size / 2 * 125%>px">
Whee!
--Al Evans
--
Posted via http://www.ruby-forum.com/.
2006 Mar 26
2
Shared Columns in an STI
I have a an STI table which acts_as_tree, that has a large number of
classes/types. My common fields are:
id
parent_id
name
description
with 4 more text fields, I could cover most of my classes if I could
redefine the name of the field like this.
text1 AS address1
text2 AS address2
text3 AS zipcode
For one class and
text 1 AS model_number
text2 AS vendor
Is there a construct that will allow