similar to: Why is my record readonly=>true?

Displaying 20 results from an estimated 4000 matches similar to: "Why is my record readonly=>true?"

2006 Feb 15
1
Per Database Migrations
Is there away to have parts of a migration file only work with a specific database. For example I am inserting some data into a table with: execute "INSERT INTO demo_lists(position, name, updated_at, created_at) VALUES (1, 1, ''scott'', CURDATE(), CURDATE());" Of course the curdate() function may only be available on mysql. So can we some how determine which
2009 Apr 24
2
Array
Hi there, Just wondering if anyone has any tips for using arrays? I am trying to convert the following SAS code to R: data A2; set A1; by subject_id; retain BX1-BX10 i; array b(1:10) BX1-BX10 ; if first.subject_id then do ; do j=1 to 10; b(j) = .; end; i=1; end; b(i) = BX; i = i+1; if last.subject_id then
2007 May 31
4
Sample Merb App
I put together a sample app to help people learn Merb: http://svn.depixelate.com/applications/invoice_tracker/ I also blogged about it here: http://depixelate.com/2007/5/31/taking-merb-for-a-spin -- Zack Chandler http://depixelate.com
2006 Jun 08
5
Displaying Calculation on Index
Hi, I am trying to create a simple point system and display the total on my index page. So I have my db basically setup like this: Posts id, body, created_at, user_id Post_points id, post_id, user_id, created_at, value So as you can see I am allowing other users to create points on the post and my db will store who gave the point as well. "value" is the point value which can
2006 Aug 03
6
Listing all of a nested Resources
I''ll use the example on the Rails blog. map.resources :posts do |posts| posts.resources :comments, :trackbacks end Now comments are at /posts/:post_id/comments. Okay but what if I want to list all the comments for all the posts. It should be at /comments, but that isn''t map that way. Can I map comments twice? -- Posted via http://www.ruby-forum.com/.
2006 Jan 29
16
counting rows via associations
Hi: I have a table called clients and each client has many lists (a has_many and belongs_to has been created in the class. What I need to do is get a count of the rows in each list for each client. I was hoping I could do something like client.lists.count but it does not seem to work. Any suggestions? bruce
2009 Apr 22
1
Count Code
Hi there, I am interested in converting SAS code to R & I wondered if anyone had any quick R code/tips for the following piece of test SAS code? Any feedback greatly appreciated. data A1; set A1; count + 1; by subject_id; if first.subject_id then count = 1; run; [[alternative HTML version deleted]]
2006 Apr 08
2
trouble expiring cached pages
I''m having a bear of a time getting my cached pages to expire. Maybe one of you guys can help me out. I''ll show my sweeper and then my log to show that it "should" be working. class PragmaticSweeper < ActionController::Caching::Sweeper observe Comment def after_save(comment) expire_page(comment.post_id) end private def expire_page(post_id)
2005 Mar 10
10
Some Basic Questions
Sorry I can''t access IRC from work so I hope you don''t mind me asking my newbie questions here: 1) I have the following code: @post = Post.find(@params[''id'']) @comments = Comment.find_all "post_id = #@params[''id'']", "created_on ASC" And I am have problems with the second line. I want to pass the id from my post to the
2006 Jul 04
8
writing to many_to_many table
I have three tables. users, posts, users_posts. This last one is to mark a post as read. How do I write to the users_post table? Here''s what I have: In model ''User_Post'' belongs_to :post belongs_to :user In post/view/show: <%= link_to "Mark As Read", :controller => ''post'', :action => ''post_read'', :user =>
2009 Aug 16
5
any help with captcha in my comments ?
this is my error: Processing ApplicationController#create (for 127.0.0.1 at 2009-08-17 00:57:56) [POST] Parameters: {"comment"=>{"name"=>"asdasd", "body"=>"asdasd"}, "commit"=>"Add Comment", "post_id"=>"19",
2009 Jul 30
2
weight median by count for multiple records
Hello everyone, I have a .csv file with the following format: uniqueID SubjectID Distance_miles Tag 1 1001 5.5 3 2 1001 7 1 3 1001 6.5 1 4 1001 5 1 5 1002
2009 Jan 25
1
Multiple lattice plots on a page: aligning x-axes vertically
Dear R-help, I am creating a two lattice plots (a densityplot() and xyplot()) that have the same x-axes and then 'printing' them onto the same page, one above the other (see end of email for an example to generate the graph). With different labels on the y-axis for each plot the left spacing is different, and the x-axes don't align vertically. Although I can manually modify the
2009 Jan 27
1
Creating list or numeric vectors out of selected columns of row oriented data
I am just assuming this can be done, but I have not gotten close to making it happen. I have a data file with about 1 million rows with 1470 unique subjects. Each row represents a small set of observations made on a specific date for a single subject. I would like to transform the data so that I have an R object with a single entry for each subject and start date and vectors for the
2007 Nov 12
7
schema_info always wants to be 3, even when set to 7
Hi all, I''m having a very odd problem with db:migrate. I''m using Rails 1.2.5 on Windows XP SP2 and Ruby 1.8.6 I have seven migrations. If I run them with an empty database, it runs the first three, then halts. When I look in schema_info, the version is 3. If I run db:migrate VERSION=7, then it runs through the remaining 4 migrations, and the version is 7 in the DB.
2009 Apr 15
2
Getting Started with Rails - post_comment_url
Hi, Thanks for a wonderful Getting Started with Rails. I am up to the last section and just added the comments part. So while testing and looking over comments_controller.rb; I see the reference to post_comment_url calll where is this defined. Below is the message I am getting. Thanks ActionController::RoutingError (post_comment_url failed to generate from {:post_id=>#<Post id: 1, name:
2008 Apr 14
2
Problems with nil object
Hi to all. I''ve a very big problem. I know this can seem very loing, but please, try to read it. I have a simply blog, with posts and their comments. I''ve two tables in my db, posts, with post id, text and comments_count to store the number of comments-children of each post (as recomanded to do in AWDWR); and the table comments, with comment id, post_id for the post
2006 Feb 24
4
too many components?
okay. on /posts/show/13 i have show.rhtml, which does render_component(:controller=>''comments'', :action=>''display_comments'', :id=>post.id) on comments/display_comments i iterate through the comments and then, display_comments.rhtml render_component(:controller=>''comments'', :action=>''new'', :id=>@id)
2009 Sep 23
2
collection_text onchange event
hi, I want to display a drop down list and when i select some option from the drop down list i want to display all the records under that selected category in the "SAME PAGE".. eg .. <%= collection_select(:question,:subject_id ,@subject, :id, :name) %> when i choose a subject i should, display all the questions under that subject in the same page.I am new to rails.Can
2008 Nov 20
2
Calculating SD according to groups of rows
*Hi all, I know this is probably basic, but I have proven to be a slow learner in any programming language. Anyhow, how can I calculate the SD for each person in my table? I have two patients in this R data.frame, 7200 and 23955. I extracted this from a relational database, but am I better off attempting to compute SD in SQL, or is this easily accomplished in R? * SUBJECT_ID HR 1