Displaying 20 results from an estimated 3000 matches similar to: "autosave no longer a valid option for belongs_to?"
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
2010 Mar 10
0
Rails ActiveRecord associations autosave option
I have the following associations.
class Document < ActiveRecord::Base
has_many :document_sections, :dependent => :destroy, :autosave => true
has_many :document_items, :through => :document_sections
end
class DocumentSection < ActiveRecord::Base
belongs_to :document
has_many :document_items, :dependent => :destroy, :autosave => true
end
class DocumentItem <
2012 Mar 15
0
Make Asset Pipeline compatible with Chrome DevTools Autosave
https://github.com/NV/chrome-devtools-autosave doesn’t play nice with Asset
Pipeline. https://github.com/NV/chrome-devtools-autosave/issues/27
The culprit of the problem is in the asset’s URLs. I cannot decipher a file
path by its URL. For instance, /assets/main.css?body=1 could be either
app/assets/stylesheets/main.css, lib/assets/stylesheets/main.css
or vendor/stylesheets/main.css.
To fix
2007 Aug 10
2
DO NOT REPLY [Bug 4873] New: rsync transfers stop when encountering Emacs autosave files with hash signs
https://bugzilla.samba.org/show_bug.cgi?id=4873
Summary: rsync transfers stop when encountering Emacs autosave
files with hash signs
Product: rsync
Version: 2.6.9
Platform: x86
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P3
Component: core
AssignedTo:
2012 Jul 10
1
has_many association with autosave issues
I''d like to use autosave => true for an association for its added benefits:
the parent doesn''t save unless the children saves. However, it seems to
skip validations when saving the children. And this seems to be the case
since the beginning of time...
Anyone know why?
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2010 Dec 29
3
Windows editor suggestions - autosave
I am looking for advice on an editor to use with R (windows) that has an autosave feature. I typically write scripts using the RGui (and tried TinnR yesterday) but I am having continuing problems with BSODs (non R related) and have in the past have had issues with R crashes and would really like a system that does not require me to remember to hit the save button on my script every 10 minutes so
2009 Feb 26
1
composed_of, aggregate object isn't saved
I am relatively new to rails and I cannot figure out what is going on
here. I am using the composed_of method in an ActiveRecord class to
create two aggregate properties: shipping_address and billing_address.
The object properties are getting populated from the form and validation
is working - no problem. When I call order.save, though, everything is
being saved except the address fields. I am not
2009 Feb 26
1
Problem w/ActionWebService and Inheritance in Service Params
I have a service method that takes a PaymentMethod which can either be a
CreditCard or a PayPal account. When I request the service and pass one
or the other it always comes over as a PaymentMethod; the service
doesn''t seem to know that the parameter is really a CreditCard or
PayPal. Here''s some sample code that illustrates what I''m talking about
more concretely:
2007 Nov 20
2
confirming that a model instance was correctly created from POST params
I''m wondering whether I''m wasting my time trying to verify that an addition I''ve made to legacy code is in fact setting a new attribute on a model.
Substruct''s (http://dev.subimage.com/projects/substruct) OrderHelper contains this method:
1 def create_order_from_post
2 @use_separate_shipping_address = params[:use_separate_shipping_address]
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,
2008 Jul 07
0
ActiveRecord in Rails 2.1.0 misbehaving for Aggregate Attr.
I am not sure if this is a bug in ActiveRecord or is this the intended
behavior. If it is then it does not make sense to me.
In a nutshell: If you change an aggregate object attribute created via
composed_of method (see Agile Web Development - Second Edition Chapter
17 page 313 onwards) and then save the model, the change to the model
(composite attribute specifically) will not be saved UNLESS
2009 Jun 24
1
accepts_nested_attributes_for :reject_if issue
I have the following models:
class Order < ActiveRecord::Base
belongs_to :billing_address
belongs_to :shipping_address
accepts_nested_attributes_for :billing_address
accepts_nested_attributes_for :shipping_address, :reject_if => proc {
|attributes| attributes[''has_shipping_address''] != ''1'' }
def after_initialize
self.build_billing_address
2008 Dec 02
4
Am I wrong or is fields_for not working right in Rails 2.2.2
I may be totally wrong about what the fields_for method is supposed to
do, but for some reason I thought using it scoped an object around an
association.
For example, I have a User class and when you''re creating a new user I
want to use fields_for to add a BillingAddress to the user like so:
<%- fields_for :billing_address do |billing_address_form| -%>
<%= render :partial
1999 Sep 12
0
Just a thought ...
Dear all
As someone who leaves his R session open for days - even longer - because
only I access the computer it is on, I very occasionally crash it (my most
recent success was to use a very long plot() which it turned out have both
'l' and a 'b' without keyword!).
I try to be careful, preserving essential bits of coding in an adjacent
emacs screen and doing save.image() from
2011 Nov 24
0
legacy MTI schema
Hi all,
In a legacy ''immutable'' schema I have MTI inheritance setting:
<<TABLE systems>>
id<<PK>> ( NOT database generated)
installation_date
manufacturer
serial_number
<<TABLE lifters>>
id<<PK>><<FK>> ( NOT database generated )
max_weight
drive
In my model I have implemented the semantic of inheritance between
2007 Jun 18
0
Problem with belongs_to associations validating associated class: bug in rails in development mode?
Hi all,
I''m using rails version 1.2.3.
I have the following association in my View class
belongs_to :viewer, :class_name => ''User'', :foreign_key => :viewer_id
And of course i have a User model class defined to.
The problem was that when i tried to use this association it would
only work once.
At the second try, i would get the following strange error:
2006 Jun 06
1
Please Help with single table inheritance relationships
I''ve been searching the web, wikis, and more, and I haven''t turned up
examples of how to have multiple entities in a single-table inheritance
related to anything.
I have an addresses table, but multiple entities can have Addresses:
both Person (which has 2 addresses) and Retailer. I''ve been told that I
need to use single-table inheritance, and this was my attempt:
2006 Jul 30
3
ActiveRecord - Multiple Address for a single record
I''m trying to figure out the Rails way to model the following problem:
I have 2 tables. One (let''s call it location) contains a single
address. The other (let''s call it company) contains 3 address. I''m
trying to figure out the best way to model this. I''ve created an
address table, a set up the model as follows:
class Address <
2006 Feb 24
4
Problem having two belongs_to of the same class type
I have a Shipment class that is used to ship packages between Branches.
However, when I try to have two belongs_to in Shipment called shipped_to
and shipped_from I can''t seem to make it work. I can get it to display
the form properly but when I select the branches and click save I get
the following error...
"Branch expected, got String"
Any ideas? I have added some code
2006 Apr 25
3
belongs_to and has_many
I know this has been rehashed many times, but I don''t get it.
I can''t find it documented to were I understand all the parts. I can
make this work using Rails database design conventions, but in this case
I am not able to do that.
I find examples, but the ones I find do not follow the conventions.
They also do not give enough information to understand what is going on.
In