similar to: specin'' update_attributes! + Hash

Displaying 20 results from an estimated 90 matches similar to: "specin'' update_attributes! + Hash"

2009 Dec 13
20
Need help...NameError in InteractController#add_to_cart
Hi,I am developing a web app and am following the text-Agile web development.....Each time I click my "add to cart" button" i always get the  page below:I have double checked to see if i have errors in my code,there was none,please what do i need to do to proceed? NameError in InteractController#add_to_cartundefined local variable or method `find_cart'' for
2018 Jan 26
0
Help in Plotting in "fArma" Package
> On Jan 26, 2018, at 9:51 AM, MacQueen, Don <macqueen1 at llnl.gov> wrote: > > What Dave said, plus here's a hint. Try this example (which uses base graphics): > > plot(1:5) > plot(1:5, cex.lab=2) > > Then look at the help page for par > help('par') > or > ?par > to search for other graphics parameters (base graphics) you can use to
2019 Jan 24
0
Possible setClassUnion Unloading Issue
I'm encountering a problem caused by class unions from unloaded packages that are referenced by the still-loaded subclasses. In essence, when the class union is loaded initially, it registers itself as a super class of the component classes in the S4 cache. When the package the class union lives in is unloaded, it does not undo that registration. Here is an MRE of the problems it causes:
2006 Jan 02
0
Problem with remote updates
My form_remote and link_remote tags seem to messing up and keep making the tag they are supposed to update, disappear completly. They''ll fade out, and then start to fade in but then just dissappear. I think its happening because both actions are firing at the same time on a fairly simple request. For example, I have a link_to_remote tag: <%= link_to_remote ''Edit'',
2007 Oct 13
3
[RSpec] Unexpected behavior using TextMate Bundle...
Howdy, Why does the bundle NOT work when I do the following: - Start TextMate - Open my project - Open my spec - Try to run spec and get an error While the following DOES work: - Open Terminal - Locate my project - Start TextMate via command line (mate .) - Open my spec - Try to run spec and it works Cheers, Mel -------------- next part -------------- An HTML attachment was
2018 Jan 26
2
Help in Plotting in "fArma" Package
What Dave said, plus here's a hint. Try this example (which uses base graphics): plot(1:5) plot(1:5, cex.lab=2) Then look at the help page for par help('par') or ?par to search for other graphics parameters (base graphics) you can use to change various things. Success will depend, as Dave indicated, on how the package author handled the plotting options in rsFit(). -Don --
2006 Jul 11
3
update_attributes and save!
I notice that ActiveRecord::Base.update_attributes() calls save(). What if I want to get an exception if the save fails? Is there a way to get the update_attributes() function plus the save! function? Thanks, Wes -- Posted via http://www.ruby-forum.com/.
2006 Jun 26
0
Update_attributes working, or not? I can''t tell.
I have a basic login system implemented. I''ve recently added a timestamp field "last_activity_time". During the login process, if I successfully get back a user object, I do this: user.update_attribute(:last_activity_time, Time.now()) It appears to be successful given the breadcrumbs I''ve strewn around it, but nothing gets written out to my table. In
2006 Jun 27
1
user.save now workie, but user.update_attributes does
In my User model, I had this: def update_last_login_time self.last_login = Time.now self.save end But last_login was not being set. When I changed it to this it worked: self.update_attribute( :last_login, Time.now ) Any ideas why? ~S
2006 Apr 21
0
collection_select has_and_belongs_to_many update_attributes
I know there have been threads on this before but I was thinking shouldn''t multiple collection_select automatically update habtm relations when you update_attributes? In order to get multiple collection_select to work I use: collection_select(:user, :group_ids, Group.find(:all), :id, :name,{},{:multiple=>'''',:name=>''group[id][]''}) In fact if I
2006 Apr 28
1
@model.update_attributes(params[:model]) without saving?
Is it possible to update the parameters from a form without saving? @model.update_attributes(params[:model]) will save the model after updating its attributes. I''d just like the attributes updating without a save. Thanks Chris -- Posted via http://www.ruby-forum.com/.
2006 Feb 04
0
object.update_attributes(hash)
shouldn''t @m.update_attributes(params[:m]) only update the attributes listed in the params hash? it tries to update all table attributes I hacked _form.rhtml and removed some of the fields, hoping that they will not be updated.. but it didn''t work.
2006 Jan 04
0
update_attribute works, update_attributes doesn''t, why?
Hello again... so I narrowed my problem down. For some reason, while using login_generator, any User object I pull from the DB can be updated one attribute at a time using update_attribute, but when I try and do update_attributes it fails every time. Is this a limitation with login_generator that I don''t know about, or is there a way around this? I also tried the .update method and
2006 Jan 15
0
update_attributes not working
I dont know if its me or the dodgy win-32 intall of ruby/mysql, but I can''t seem to get update_attributes to work. In my user controller, I have: def update @user = User.find(@params[''user'']["id"]) if @user.update_attributes(@params["user"]) flash["success"] = "Updated Successfully" redirect_to :action =>
2007 Mar 25
1
Optimistic locking and update_attributes: not working?
Hi all, I''ve searched the forumns, but I can''t seem to find an answer to this one. I''m having trouble getting optimistic locking (OL) to work in my app, even though all of the pieces are there: * table has lock_version column, with default of 0 (zero) * lock_version column is being incremented by the first update (but the second doesn''t catch it) *
2008 Aug 26
1
transaction not working with update_attributes!
I am trying to wrap the updating of two models in a transaction and when the transaction fails it is not rolling back. My method is : def update_attributes(user,params) @user = user @company = user.company begin User.transaction do @user.update_attributes!(params[:user]) @company.update_attributes!(params[:company]) end true rescue false
2011 Jun 06
0
quick question: are errors best checked on controllers by stubbing save/update_attributes?
Hi, Is it best to simulate errors in functional testing by stubbing the controller save/update_attributes to return false? Will I miss anything important if I always test controller behavior in the case of errors in this way? Thanks, Lille -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2009 Feb 03
1
update_attributes! does not update nested model
Hi! I have updated my app to rails 2.3. I have form that has few nested models and I am happy that I can just write accepts_nested_attributes_for :tasks, :allow_destroy => true, but update_attributes! does not update my nested model. I have tried update_attributes, and it works. Any ideas? Few lines from log: update_attributes: SQL (0.1ms) BEGIN Education Update (0.3ms) UPDATE
2009 Jan 06
2
Update_attributes on multiple models, revert back on error
Hi, I have one method, ''updateStuff'', that will call ''update_attributes'' on 3 different models in the DB..... How can I account for validation to revert back all updates if one of the models is not valid? I''ve looked into Model.valid? which doesn''t seem to work for me .. Any idea? Thanks
2012 Jun 29
0
Can I make Rails update_attributes with nested form find existing records and add to collections instead of creating new ones?
Hi there, I''ve asked this question at stackoverflow.com http://stackoverflow.com/questions/11257662/can-i-make-rails-update-attributes-with-nested-form-find-existing-records-and-ad I haven''t seen a better answer than one I propose myself but I''d like to know if it''s possible to enhance accepts_nested_attribute_for to allow a find_or_create_by behavior for