Displaying 20 results from an estimated 200 matches similar to: "Problem w/ActionWebService and Inheritance in Service Params"
2008 Jul 16
2
belongs_to causing endless loop on first call to save!
Hi,
I have a situation I''m hoping someone out there may be able to shed some
light on. I have a Rails app (2.1.0 on Ruby 1.8.7) with a wizard-based sign
up process, that has recently been changed from storing incremental data in
the database to having a medium sized object graph living in the user
session until the user completes the entire sign up process (this is a
business
2011 Nov 02
2
Specify and validate requirements on an ActiveRecord association
Looking for some guidance/support on what feels like might not be an
uncommon use-case.
`User.has_many accounts`
`User.has_many payment_methods`
`Account.belongs_to :user`
`Account.belongs_to :payment_method`
`PaymentMethod.has_many :accounts`
There are lots of `Accounts`. When I (a `User`) want to assign
accounts to a `PaymentMethod`, I really don''t want to scope against
all of them,
2005 Apr 19
3
Rails 0.12.0 / ActionWebService 0.7 bug?
Hi,
Just upgraded to Rails 0.12.0 and ActionWebService 0.7. I''m using the
special struct class to create custom structs. In version 0.6.2 I was
able to receive nil values for members of the struct. As of version 0.7
all nil values seem to be rewritten to some default value (empty string
for string member, 0 for int etc.), which breaks my application. Is this
a bug or a feature?
2009 Mar 10
0
autosave no longer a valid option for belongs_to?
The Rails API doc (api.rubyonrails.org) says that :autosave is still a
valid option for belongs_to in the latest version of Rails. However, a
look at the activerecord/lib/active_record/associations.rb (line 1590)
reveals that it is not in the @@valid_keys_for_belongs_to_association
array. I also noticed that it''s not in the ActiveRecord API doc
(ar.rubyonrails.org).
Does anyone have any
2007 Sep 09
1
filter_parameter_logging
Hi,
Is there a way to specify keys of a hash in params to
filter_parameter_logging.
For example, my payment form sends creditcard[:number] and
creditcard[:type] in params and I filter these keys using
filter_parameter_logging :number, :type.
I don''t want :number and :type in other forms to be filtered. Is there
a way to solve this?
thanks,
Ritesh
2006 Aug 17
2
validates_associated bug?
i seem to be experiencing a bug where rails tells me that my
organization object''s associated credit card is invalid (activerecord
validation-wise invalid), when i know it to be valid. this happens
only if i tell the organization to validate_associated :credit_card.
i know the associated credit card is valid, because a) that
credit_card object itself throws no validation errors, and b)
2005 Dec 19
0
Re: Rails Digest, Vol 15, Issue 392
Peter Bohm wrote:
> which way do you send the email? Using the raw TMail object as described
> in the HowToSendMimeMultipartEmailsWithActionMailer? Can you post some code?
I''ll describe the problem in a bit more detail, and then will describe what I did to solve it.
The site I''m working on wanted to send an acknowledgment to people using our e-commerce site. The message
2010 Aug 13
2
Rails 3 / ActiveModel for Credit Card information?
When submitting billing information in the past I''ve always used
attr_accessor for credit card details as they should not be saved in
the database. In addition I always end up storing the card
expiration date so that the date form helper works correctly.
With Active Model it seems logical to create a CreditCard class to
hold this data instead.
**1st issue.**
It seems there still
2010 Nov 23
1
About available datasets on PC
Hi folks,
Win7
On running;
data(package = .packages(all.available = TRUE))
it displays a list of datasets under:-
Data sets in package ?AER?:
But I couldn't call/load all of them on the list.
> DJFranses
Error: object 'DJFranses' not found
> CreditCard
Error: object 'CreditCard' not found
But I can call/load;
> iris
Whether the list shows all available
2006 May 30
2
ActiveMerchant
Is anyone using ActiveMerchant currently?
I''ve seen it recommended on this list several times, but it seems kind
of buggy and incomplete and I''m having trouble getting it to work.
>From the example at http://home.leetsoft.com/am/, I''ve tried:
gateway = ActiveMerchant::Base.gateway(:authorized_net)
response = gateway.capture(1000, creditcard)
..but it
2007 Sep 07
2
My controller became fat trying to handle multiple models - need guidance please
Hello all.
I am experiencing something that has to be fairly common in the rails
world, but I haven''t found a clean solution yet.
I have a SignupController that handles multiple models in a single
form.
Those models are User, UserProfile, CreditCard, Subscription, and
Order.
When the form is filled out and posted, I want to do exactly what I
would do if the form was only for a single
2006 Mar 28
11
ActionWebService date casting error
I have defined a web service to return information from a database as follows.
class BackendApi < ActionWebService::API::Base
api_method :find_all_vobs,
:returns => [[:int]]
api_method :find_vob_by_id,
:expects => [:int],
:returns => [Vob]
class BackendController < ApplicationController
wsdl_service_name ''Backend''
2007 Oct 13
4
Chapter 9
Hello,
I''m currently stunk on this issue for few days and I do not know how
to get it fixed.
The system always raises this error message :
order is closed
and here is my order.rb:
class Order < ActiveRecord::Base
include ActiveMerchant::Billing
before_validation :set_status
attr_protected :id, :customer_ip, :status, :error_message, :updated_at, :created_at
attr_accessor
2009 Oct 07
1
output validations errors form causing type error?
Hi,
I was wondering if it is possible to output validation errors in a
nested form? I suppose this should be possible, but I am experiencing
an error message that I can''t track down.
The error I get is the following :
TypeError in Store/orders#create
Showing app/views/store/orders/new.html.erb where line #45 raised:
can''t convert Array into String
This is ocurring in the
2007 Jun 21
2
expects with returns that returns the return value of the actual method
I''m trying to test some code that''s using active_merchant using the
following test. What I''d like to be able to do is verify that purchase is
called, however, rather than specifying the return value for purchase with
returns, I''d like it to return the actual return value provided if you
called the non mocked purchase method. Is this possible?
def test_charge
2007 Jun 21
3
only checking certain parameters for a method
I''m writing a test where I only care about one of the parameters being sent
to the method, does anyone think having a way to say that any value for a
parameter which I don''t care about is valid? I''m thinking something like:
def test_charge_is_for_10_bucks
gateway = test_gateway
member = Member.new
member.credit_card_number = "1"
2005 Apr 27
1
Ruby Shipping
To accompany the Payment library (http://payment.rufy.com/), I have
created the shipping library that connects APIs for various shippers
like UPS and FedEx. It is available as a ruby gem:
gem install shipping
or from rubyforge
http://rubyforge.org/projects/shipping
There is going to be some data that will persist for all shipments. For
example, you will not want to repeat the fedex account
2006 Jul 12
0
acts_as_authenticated and paypal
I''m working on a subscription form that has to be tied to paypal using
the paypal ipn plugin at http://elctech.com/products_ruby_paypal.shtml.
I''ve got my subscription (signup) form setup to include the creditcard
information as well as the billing address etc. It''s a modified version
of the signup form from the acts_as_auth plugin.
I want the model to not save if
2012 Apr 21
0
Making it a pay service
Rails 3.1.3
Hi. I have a general question about making a web service
premium-version.
A rails service can ask the users to pay for premium services.
I need some concrete samples of deploying such functionality to the
rails app, if any, including necessary gems, (ActiveMerchant, maybe?)
The methods of payment may include PayPal and CreditCard.
Does anyone have suggestions?
soichi
--
Posted
2008 Oct 16
0
Active merchant
Hello Friends,
As i am using AuthorizeNetGateway for payment. So again with price i want to
store the user information as well currently i am just passing the following
information
response = gateway.purchase(amount, creditcard)
what else do i need to pass to store the user information?
thanks
abhishek
--~--~---------~--~----~------------~-------~--~----~
You received this message because you