similar to: Using link_to_remote to add a record

Displaying 20 results from an estimated 3000 matches similar to: "Using link_to_remote to add a record"

2007 Jun 04
1
acts_as_rateable in Beast
I''m trying to implement acts_as_rateable to my Beast installation to give users the option to rate posts (like reddit). I chose acts_as_rateable as it supposedly easily allows reddit-type voting but I''m having some problems setting it up and the documentation seems outdated. (http://www.juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/) So far, I''ve
2006 Sep 23
8
acts_as_rateable plugin help!
Hello, I am having some trouble figuring out how to use the rateable plugin. i followed as close as the directions located at http://www.naffis.com/blog/articles/2006/08/31/rails-ajax-star-rating-system but i fail at working it. i am getting this error You have a nil object when you didn''t expect it! The error occured while evaluating nil.rating Extracted source (around line #1): 1:
2008 Aug 27
5
VALIDATION QUESTION
I''m trying to validate a record before save. I''m using one controller in this case furnii where I have all my calls. The problem is that, the form containing the field I''m trying to validate resides in the furnii views. I tried to add validates_presence_of :content (the field name) in both the furnii model and the ratecomment model but it does not work. I know there
2007 Apr 13
0
mixin behavior
Hi, all, I need to DRY up some code in a few models. My first inclination, having come from the Java world, was to go with an abstract class. After a bit of reading, I then decided to follow the mixin route instead. Now I''m running into trouble, most likely from a few basic misunderstandings. There are three models I will be using to average and count rating data by executing a
2008 Jul 01
2
rateable plugin problem
I am having some problem figuring out how to use the rateable plugin. i followed as close as the directions located at http://www.naffis.com/blog/articles/2006/08/31/rails-ajax-star-rating-system but there seem to be some problem. I am getting the following error You have a nil object when you didn''t expect it! The error occured while evaluating nil.rating Extracted source (around line
2006 Aug 17
2
link_to_remote question
I''m using link_to_remote to call a method that deletes an item <%= link_to_remote " [delete]", :url => { :controller => ''user_admin'', :action => ''employee_type_delete'', :id => employee_type.id }
2011 Oct 05
1
lattice-dotplot: resize axis
dear all, I want to make a dotplot with ratings from Items in 6 ItemsGroups. I reordered the items by rating within each group. I plotted the items by rating conditional on ItemGroup. The ordering works as I wanted but my y-aches labels (items) within each ItemGroup are now unequally spaced, e.g., in some panels there is a gap between one lower rated item and the next higher, to give a picture
2011 May 08
2
help with mysql and R: partitioning by quintile
Hi, I have a mysql table with fields userid,track,frequency e.g u1,1,10 u1,2,100 u1,3,110 u1,4,200 u1,5,120 u1,6,130 . u2,1,23 . . where "frequency" is the number of times a music track is played by a "userid" I need to turn my 'frequency' table into a rating table (it's for a recommender system). So, for each user, I need to categorise the frequency of tracks
2010 Jan 17
1
how to manipulate this data? Thank you very much!
Hi, R experts: I am asking for helps with manipulating this data: we have different groups: A,B, C, and so on. In each group, we have different students, for example, we have 6 students in A and 5 students in B. Each student gives a rating, which ranges from 1 to 3. We want to manipulate this data and add three more variables called as 1, as 2 and as 3. For example, in group A, for each student,
2012 Oct 21
5
Error occured while evaluating nil
This is the code if !params[:ratings].nil? params[:ratings].each_key do |r| @selected_ratings << r @movies << Movie.where(''rating = :rating'', :rating => r) @sort = params[:sort] end elsif @selected_ratings = @all_ratings @movies = Movie.order(@sort) @sort = params[:sort] end This is the error You have a nil object
2007 Jul 21
3
unable to get "has_many :after_add" to work - need help
Can someone tell me what I''m doing wrong? I''ve spent way too much time on this -------------------------------------------------------------------------------------- class Picture < ActiveRecord::Base has_many :ratings, :after_add => :increment_rating, :after_remove => :decrement_rating def increment_members(rating) self.rating += rating.amount save!
2009 Jan 07
1
proto question
Dear R Users, I have a couple of proto objects like: wedge <- proto(expr={ start.year <- 2008 end.year <- 2050 }) star.rating <- wedge$proto( star = c(4, 5, 8, 10), gain = c(0, .3, .5, .7), cost = c(0, 2100, 4000, 7500), star.rating <- function(., year) 6.0, setup = function(.){ .$cost.for.star <- approxfun(.$star,
2006 Aug 03
2
calculating average ratings and other imponderables
Okay, this *should* be easy, but it isn''t, although I reserve the right to smack myself upside the head if it is: Assume that a smart has_many ratings, and a rating belongs_to a smart (the models are fine). Each rating has a column smart_id. Each smart, then, has many ratings, with a column called "rating" that is an int (1-10). I want to find, say, the ten smarts with
2012 Oct 21
2
check box tag binding between controller and the view
I am new to RoR. The problem i am facing is that that i have a few check box and initially when i run my app for the first time i want them all to be selected while for every next time i want it to have the last checked boxes checked. To do this, In my controller i have @all_ratings = Movie.all_ratings @selected_ratings = [] if !params[:ratings].nil?
2008 Mar 31
2
Finding a mean value of a variable holding a dummy variable fixed
I have time-series data on approval ratings of British Prime Ministers. The prime ministers dating from MacMillan onward till today are coded as dummy variables and the approval ratings are entered for each month. I want to know the mean value of the approval rating of each Prime Minister in the dataset and the approval rating during his/her first month and last month as PM. What R code should
2006 Dec 26
4
Rating competitors
I am looking for hints on how to estimate ratings for competitors in an ongoing pairwise competition using R... my particular area of interest being the game of Go, but the idea of identifying ratings (on a continuous scale) rather than relative rankings seems easily generalized to other competitions so I thought someone might be studying something related already. I presume the rating of a
2006 Dec 06
2
validates_uniqueness_of where scope euqals created_by "magic" field
I have the following ActiveRecord objects: class Recipe < ActiveRecord::Base has_many :ratings, :dependent => true . . . end class Rating < ActiveRecord::Base validates_uniqueness_of :created_by, :scope => :recipe_id belongs_to :recipe, :counter_cache => true . . . end The created_by field on Rating is implemented as a "magic" field similar to this:
2010 Nov 07
1
creating a scale (factor) based on a continuous variable nested within levels of factor
Hello R-helpers I hope that my subject line is not detering anyone from helping me out:) I have been stuck of a few hours now, and I don't seem to pinpoint where the problem is. I have a data.frame which is structured as follow: str(hDatPretty) 'data.frame': 1665 obs. of ?8 variables: $ time ? ?: num ?0 1.02 2.05 3.07 4.09 ... $ hr ? ? ?: num ?62.4 63.6 64.6 65.5 66.2 ... $ emg ? ?
2007 Jul 12
1
ggplot2 / reshape / Question on manipulating data
I'm an R newbie but recently discovered the ggplot2 and reshape packages which seem incredibly useful and much easier to use for a beginner. Using the data from the IMDB, I'm trying to see how the average movie rating varies by year. Here is what my data looks like: > ratings <- read.delim("groomed.list", header = TRUE, sep = "|", comment.char = "")
2008 May 02
1
GLMM and data manipulation (2nd try)
Hello, I posted a question yesterday but I got no replies, so I'll try to reformulate it in a more concise way. I have the following data, summarizing approval ratings on two different surveys for a random sample of 1600 individuals: > ## Example: Ratings of prime minister (Agresti, Table 12.1, p.494) > rating <- matrix(c(794, 86, 150, 570), 2, 2) > dimnames(rating) <-