Displaying 9 results from an estimated 9 matches similar to: "Having trouble adding rows to an association"
2007 Apr 22
1
labels
Hello, I would like to add to axis labels special caracters. Instead of writing :plot(simul, xlab="beta", ylab="sigma11") It would be great if I could write something as in LaTeX :plot(simul, xlab="\beta", ylab="\sigma_{11}") Is there a way to do that ? Thank you
_________________________________________________________________
ues clics pour retrouver tout
2009 Feb 21
1
undefined method user_id
Basically, Im trying to add comments to photos that other users have
uploaded. And Ive encountered an error:
NoMethodError in CommentsController#create
undefined method `user_id='' for #<Comment:0x4768cd0>
C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1857:in
`method_missing''
2009 Feb 22
2
Mysql error unknown column 'columns.user_id'
Had this error when trying to add comments to another user''s photo.
ActiveRecord::StatementInvalid in User photosController#show
Mysql::Error: Unknown column ''comments.user_id'' in ''on clause'': SELECT
photos.`id` AS t0_r0, photos.`user_id` AS t0_r1, photos.`title` AS
t0_r2, photos.`body` AS t0_r3, photos.`created_at` AS t0....
I did create a user_id
2006 Apr 25
8
Does Rails suppports XHTML for views for inline SVG''s?
I have following piece of code(which when saved in a file with .xhtml
extension and opened in Mozilla 1.5.0.2 works fine);
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:svg="http://www.w3.org/2000/svg">
<head>
<title>SVG within XHTML Demo</title>
</head>
<body>
<p> You can embed SVG into XHTML, provided that your
2007 Jul 20
8
Wx::StaticText
Salut alex.
J''ai une question a propos de wx::statictext(wxruby2)
est-il possible de mettre les accents pour la langue française?, car pour l''instant je ne peut pas mettre l''accentuation alors que ça marche bien avec "wxruby".
merci
Sebastien
_______________________________________________
wxruby-users mailing list
wxruby-users@rubyforge.org
2008 Mar 15
1
error on belongs_to method.
I followed the Ruby on Rails up and running book published by Orielly.
there are three DB tables, photo, slideshow, and slide
the Slide class in slide.rb is like this:
class Slide < ActiveRecord::Base
belongs_to :photo :foreign_key =>photo_id
belongs_to :slideshow :foreign_key=>slideshow_id
end
I inserted the sample data into database. When I trying to run the
command on page39:
2006 Jul 21
1
What''s wrong with this code?
I''m trying to interface with the flickr API to pull my photos into my
site. I don''t want to use the "flickr.rb" gem, I''d like to do it the
other way so I can learn (plus I had trouble loading the gem on my
server). Anyway, here''s what I have:
#Application.rb controller
def get_response(path, http)
request = Net::HTTP::Get.new(path)
2006 Aug 12
7
Collection assignment to a has_many :through
I''m working on a simple photo gallery in rails, it seems to be a good
project for a newbie.
I have photos and categories, many-to-many association. It worked well
with HABTM. Then I decided that it would be good to be able to change
order of the photos so that thumbnail pages would look less chaotic.
So I created a Layout model which is a join model (or whatever it is
called) that
2007 Sep 07
6
ActiveRecord::Base#update_all expected behaviour
Hi
I noticed that if in my code I use the following:
Photo.update_all("title = ''Ruby rocks'' ", "id IN (#{@photo_ids})")
All my objects are properly updated but none of the filters/callbacks
are triggered. Is that what''s expected?
I have a before_update filter set on the Photo class and it gets
totally ignored, I guess the only way to solve this