similar to: nested forms and attr_accessable

Displaying 20 results from an estimated 400 matches similar to: "nested forms and attr_accessable"

2009 Mar 31
4
Mysql Error RELEASE SAVEPOINT active_record_1
Hi, I''m trying to upgrade an app from 2.2.2 to 2.3.2 and I get a bunch of Mysql Errors : Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''RELEASE SAVEPOINT active_record_1'' at line 1: RELEASE SAVEPOINT active_record_1 Mysql version is 4.1.22 which supports save points but
2009 Jan 26
4
Mocking/Stubbing ActiveRecord.config.default_timezone
In tracking down a bug in AuthLogic I realized that I had made the same error in one of my libraries. Knowing what the error was made creating a test to expose it (using cucumber) rather trivial. However, it has occurred to me that this sort of issue is far more subtle than I first appreciated. So, I am looking for some opinions on how to test for this sort of thing in a more general sense. At
2006 Mar 24
2
Access to session data
Greetings, This, I hope, is a simply answered question. Based on Agile Web Development with Rails (depot application), I''m developing a single table application for contact info. There is only an admin side to this, so there''s always authentication. Part of the info record (member) is changed_by and changed_at which I automatically want updated. Changed_at looks after
2011 Feb 09
0
Mysql2::Error: SAVEPOINT active_record_1 does not exist
Hi, I''m switching the database of a rails 3 app I have developed from postgres to mysql so that I can avail of amazon''s rds. Before I make the change I have been running my test code using mysql on my dev machine with the mysql2 adaptor . My test code is throwing up some errors that I haven''t quite been able to get to the bottom of yet. Basically I have a model that is
2010 Mar 22
0
rspec bug, on Mysql::Error: MySQL server has gone away: ROLLBACK TO SAVEPOINT active_record_1
hello can anybody help me with this bug, (this sometimes occur sometimes passes) 1) ActiveRecord::StatementInvalid in ''MailReader on Simple Tasks should not accept duplicate email'' Mysql::Error: MySQL server has gone away: ROLLBACK TO SAVEPOINT active_record_1 /home/poldz/.gem/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract_adapter.rb:219:in
2006 Jun 15
4
testing with transactions
Hello! I experienced problems with testing transactions which are supposed to be rolled back, but are not, because of transactional fixtures eliminating the inner transaction. Can this be worked around somehow without turning off transactional fixtures? Maybe savepoints can help this? Does anyone have any experience with savepoints to achieve nested transaction functionality? Both Postgres
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
2010 Nov 30
4
Cucumber+Capybara rails 3 issue (Don't know where exactly)
When I''m executing cucumber tests, I noticed that sometimes rails app (in test env.) getting several the same requests (GET or POST) usually around 3, and it doesn''t render anything with empty HTTP status code. Have anyone met something similar to that issue? here is some example of log file: Started POST "/account" for 127.0.0.1 at 2010-11-30 22:34:17 +0200
2012 Oct 18
3
Issues upgrading RSpec
My specs work fine with this in my Gemfile.lock: grep rspec Gemfile.lock rspec (2.11.0) rspec-core (~> 2.11.0) rspec-expectations (~> 2.11.0) rspec-mocks (~> 2.11.0) rspec-core (2.11.0) rspec-expectations (2.11.1) rspec-mocks (2.11.1) rspec-rails (2.11.0) rspec (~> 2.11.0) rspec-rails (~> 2.11) After "bundle update
2010 Jan 07
17
Laptop for CentOS-5
I have a defective HP-Compaq nx9420 and so I am looking to replace it. I have pretty much decided to buy no further MicroSoft based products and would very much like to hear recommendations for a suitable notebook host to provide me with Linux based alternative. Given that all the basic functionality required is provided, the main thing that I am looking for is reliability of the host itself. I
2011 May 08
1
Transaction - but no rollback?
Hello, I''m having trouble with transactions with rails 3.0.3 and mysql 5. I''d like to import data etl-batch-style: class Job < ActiveRecord::Base # ... def perform_etl connection.transaction do extract # some connection.execute / job.update_attribute stuff transform # some connection.execute / job.update_attribute stuff end end #... end
2006 Jun 18
10
acts_as_enumerated
Hello All, Any one using acts_as_enumerated? I need help using (I like that it caches values in memory) I am working on a dating website and there are lots of options I want to store as enumerated like Status; divorce, single, Sex: male, female Eye color; blue, brown, green.... and lots more.... But I do not wanna keep them in seperate tables, and wanna keep them all together. Anyone has a
2010 Jul 19
0
Forking and integration tests
Hi All, I had a bug in one project, that data get duplicated in the DB due to multiple instances of the application (multiple thins) are accessing the DB at the same time .. The typical mistake. Problem fixed. I just need to write a test code that covers the fixed bug. I need to simulate the concurrent requests that can result in the original bug. I thought of many ideas and decided to go with
2010 Oct 27
0
Help with routes
Switching our routes file from Rails2 to Rails3 DSl uncovered an odd situation, of my own making, but I am having some difficultly imagining how to fix it. Basically I have a commonplace: user -> user_role (clearance) <- role type arrangement where: User has_many :roles, :through => :clearances has_many :clearances Clearance belongs_to :role belongs_to :user and Role
2007 May 22
4
Newbie: Am I looking at the right tool?
Hi, I''m absolutely new to centralized server management, sorry sorry in advance for any stupid remarks. Looking on the puppet documentation, I mainly find a lot of info about how to manage the config files, but nothing about centralized control. So I''m wandering if I''m looking a the right software package for my needs. I want to be able to do the following from a
2016 Mar 22
19
[PATCH v3 0/11] tests/qemu: Add program for tracing and analyzing boot times.
Lots of changes since v2, too much to remember or summarize. Please ignore patch 11/11, it's just for my testing. Rich.
2010 Feb 16
0
Strange routing(?) Issue
I have a Model event and the following two lines in routes.rb 1 - map.connect "events/:action", :controller => ''events'', :action => / [a-z_]+/i 2 - map.resources :events, :has_many => :comments, :has_one => :address #, :collection => {:mapit => :get} I have #1 so that I can call custom actions from a link_to_remote link from my index page t0 update a
2010 Jun 03
2
creating fixtures for has_many :through
I''m stymied at how to create a fixture that establishes a has_many :through relationship. I''ve watched the railscast at: http://media.railscasts.com/videos/081_fixtures_in_rails_2.mov ... but that''s for HABTM relationships. I''ve read: http://www.ruby-forum.com/topic/145676 but that ultimately doesn''t answer any question. So with no further ado:
2007 Dec 09
4
Help on drying code
Hi all, Currently I''m having to do this: def self.authorized_roles(controller, action) specific = self.find_by_controller_and_action(controller, action) all_actions = self.find_by_controller_and_action(controller, ''*'') all_controllers = self.find_by_controller(''*'') role_ids = [] specific.each do |role_item| role_ids <<
2006 Apr 15
6
view code regular expression
I''m lost on regular expressions to begin with... I''m trying to fix a value to one of 4 radio buttons as there will be value of either 1,2,3 or 4 in @roles_users... <TD><input type="radio" id="roles" name="case_managers[case_manager_name]" value="Case Manager Admin" <% if =~ @roles_users /1/ checked =