similar to: Updating a table with Ajax

Displaying 20 results from an estimated 100 matches similar to: "Updating a table with Ajax"

2006 Jun 28
3
couple newbie questions
Hello Folks, I am starting out with RoR and just browsed through Dave''s book ? couldn''t stop reading. I started building a prototype to get better hands on experience and I have run into two simple issues that I am hoping will be a quick answer for some of you experts out there. *Issue 1:* >From within a "companies" controller and list_companies.rhtml view
2006 Apr 05
2
How to add add child items to parent via parent show view?
I want to know the standard/easiest way to add items to a parent? Example: comment added to post I would like this to happen in the ?show? view of post using a form that is shown when the user clicks the ?add new? button/link. I would also like validation on the child form with the validation errors appearing in the post show? view. Two problems are presented: 1) When the user clicks the
2006 May 15
33
acts_as_commentable release
I now have the acts_as_commentable plugin up on RubyForge. This plugin will allow you to add comments to any active_record object in your Rails application. So far the directions are simple, and there are only a few features: To install: ruby script/plugin install svn://rubyforge.org//var/svn/commentable/acts_as_commentable In the readme there is a sample migration you will need to use, with
2010 Mar 05
15
Three submits, one controller
I have a ''new'' page with a submit for creating stories. On the ''show'' page the submit allows a user to enter comments. I now want a ''edit'' page for the stories with another submit for updates. I have used the ''create'' and ''update'' methods in the stories_controller on the ''new'' and
2007 Jan 21
1
Strange Ajax Error Since Upgrade
Hi All I''m getting the following very strange Ajax error and I''ve searched Google, this group and various other places to no avail. So I''m desperately hoping someone here can help. Whenever I try to execute any Ajax call whether as a form request or a link_to_remote link I get the following error: ------------------- FORM REQUEST ------------------- [2007-01-21
2006 Jul 31
1
Adding new rows to a db
I''ve created the following function, and for testing have hardcoded the following values: def addNewRow @timesheet = Timesheet.find(:employee_id => ''1'', :cost_code_id => ''14'', :dept => ''007'', :ending_date =>
2006 Sep 07
6
form_for - Child object - how to set parent id
Hi All, I am just trying to learn ruby/rails so please don''t flame me if this is a stupid question. As a learning project I decided to create my own blog using ROR. I have created a controller that shows paged blog entries, and below each blog is a list of comments along with a form alowing the user to add a new comment. To create the form for the comment entry I used form_for
2006 Feb 21
2
validations and directing errors
I am starting to play with validations as I want to catch errors before SQL rejects inserts to the table which are ugly when nulls are sent to ''Not Null'' columns, etc. If I do something in my model like... validates_format_of :first_name, :with => /^\w+$/, :message => "you moron, enter a name" I still end up
2006 Mar 20
0
Is this a Bug?
rails version 1.0 the same code render :file=>?/spec/comment_list? work will in a .rhtml file while i put it in controller ,it will produce nothing to client browser. it must use options[:use_full_path] to work fine in controller code. after read some rails source code ,i think the reason is below: file action_controller/base.rb line 602 if file = options[:file] render_file(file,
2007 Sep 23
9
Code reviews: my dumb use of acts_as_commentable (newbie)
With the help of several heroes here yesterday I beat my way into a working solution to adding comments to one or more models in my application using acts_as_comentable. Great plugin, but my implementation is lame. I need enlightenment. I have users who log in. For several views I want to let them add comments. Enter act_as_commentable which does just this -- it''s polymorphic, so you
2006 Feb 10
1
validation error reporting on child object
How does one deal with validation error messages on child objects of the main model object behind a page? I have the basic blog w/ comments page (only my "entry" is a "proposal"). I have the comments saving just fine, but I wanted to show an error if the user hits the submit button without typing anything in the comment. I added "validates_presence_of
2006 Apr 07
3
Ajax render a template
In my blog a user can add comments. I want an Ajax call to add the comment to the bottom of the comments list. How to i return a comment thats is in the comment template and add it to the bottom of the page. I have gotten as far as rendering some text back to the form and the comment doesn''t display until i refresh. This is my _newcomment.rhtml form to create a new comment <div
2010 Nov 10
1
rails "path_prefix" produces no correct verb route evaluation
Hi guys! ;) If you set "routes.rb" as: map.resources :pocoyo You have RESTful rails routes facilites. Ok, let''s focus on these two maps: "http://domain.com/pocoyo" [GET] is mapped to "pocoyo" controller and "index" action. "http://domain.com/pocoyo" [POST] is mapped to "pocoyo" controller and "create"
2007 Feb 28
2
backgroundrb 0.2.1 not supported on windows platform?
Hi all, I want to execute certain ruby script periodically in my rails application running on windows platform. I wanted to try out backgroundrb, but it seems that the support for Windows is deprecated with release 0.2.0 of BackgrounDRb. The latest release is 0.2.1 & the plugin still doesnt support windows platform. Can anyone throw more light on this? Also, can anyone suggest any
2002 Nov 14
1
comment tags
I'm trying to write comment writer thing for zinf, because I love the program, but it doesn't fully support ogg. I've found how to read comments, but can't figure how to write them. There has been some discussion about this previously in the archives, but I couldn't find any specifics, only references to code not posted to the list. The api documentation page is (painfully)
2009 Oct 23
1
help using R's linprog for LP
Hi, I am using R in one of my courses. I am trying to use R's linprog package to solve to formulate 2-class classification problem as Linear programming problem. For my formulation, I need to set to "cvec" to all 0s. I know the points are linearly separable so an optimal solution "x" does exist, which satisfies all the constraints. But given the constraints and setting
2006 Jun 18
1
plugings for date validations, email address validation & url validations in rails
Hi all, Is there any standard plugin available for date validations, email address validation & url validations in rails? Thanks in advance, Medha. -- If not you then who..... If not now then when...... ----------------------------------------------------- With Best Regards, Medha. -------------- next part -------------- An HTML attachment was scrubbed... URL:
2009 Mar 11
12
Eager loading comments associated with user submissions.
Hey everyone, I am working on an application that allows users to submit articles, and also comment on those articles. Pretty much exactly like Digg. Everything works fine except that when there are a lot of comments there are a lot of database queries to both fetch the comments and the users who posted those comments. I have used eager loading in other parts of my application to reduce the
2009 Dec 27
5
Difficulties in understanding Rail-Plugins in depth
Hi, i try to understand how plugins work in detail. Often you see stuff like: class Post < ActiveRecord::Base   acts_as_commentable end I wonder what''s happen all there. What kind of language-feature is behind this call "acts_as_commentable" ? In my opinion you need some kind of extend or include to extend the functionality of a model. And exactly this is which i found
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