Displaying 20 results from an estimated 400 matches similar to: "ActiveRecord callbacks not called"
2008 May 02
2
serial port in linux
hi,
i have centos 4.2. I have install a PCI card having serial port.
when the os is booted it detects the new hardware ( serial port) .a device is also created /dev/ttyS0. the port works very goog on the same pc in windows XP. but when i connect any serial device to that port in linux it does not work.
in /proc/ioports
there is entry for that port as
0000-001f : dma1
0020-003f :
2006 Feb 03
2
Scriptaculous: Newbie question - Effect.fade
Hi there,
Is it possible to do an effect.fade without removing the hidden document
from the flow when in becomes invisible?
I have a line of images (initially all invisible)
[] [] [] [] []
And a list of links
- link 1
- link 2
- link 3
- link 4
- link 5
And what I want to happen is to have the images appear on link mouseover
and disappear on mouseout but for the images to maintain their
2010 Apr 25
4
Image into Excel file from R
Hi useRs,
I would like to know what R users are employing to get their
images/plots created in R, into Excel sheets.
I am aware of the various packages (xlsReadWrite, RODBC) to get data
frames into R, but I would like to copy images too.
Thank you for any help in solving this problem.
Regards,
Harsh Singhal
2006 Jun 08
1
Permissions on uploaded files, TinyFile
Hi, im getting a little trouble with this, im using TinyFile as the
example to upload files
http://wiki.rubyonrails.com/rails/pages/TinyFile/versions/20
All goes well but the files uploaded are saved with permissions 600
(linux) and in the case of images arent showed on the browser(but
uploaded and stored in the server without problems) i have to manually
ftp to the uploaded files folder and
2005 Aug 04
1
HELP! X100P IRQ conflict w/ USB
PC: HP Vetra VL400
Mainbood: Intel815
BIOS: Phonix 4.0 release 6.0
OS: REDHAT 9.0
I installed the X100P in PCI slot 2 and disable the USB port, serial-port
and parallel-port in BIOS.
I can't found the X100P card in " cat interrupts"
But I can found the card in the "cat ioports"
use "lspci" I found the X100Pcard use the interrupts 11 too. Who can
help me to solve
2007 Apr 12
11
Test if view renders appropriate partial?
Hello,
I am testing out a partial that calls another, general purpose
partial as part of its processing. Is there a class I can mock in
Rails views to accomplish what I need? That is, could I do something
like the following:
SomeClass.should_receive(:render).with(:partial => "foo", :locals => {
:bars => bars })
I tried breakpointing the view, and it looks like I am greeted
2007 Jul 19
3
Merb::Controller#url Usage
I have a question about the usage of Merb::Controller#url. When I
have nested resources, requesting the new action works differently
than I expected. I was wondering what the intended usage is.
For example:
Say I have
r.resources :articles do |article|
article.resources :article_attachments
end
irb(main):002:0> show_routes
[:articles, "/articles"]
[:article_attachments,
2006 Jul 07
5
link_to: link is missing id
I''m using a legacy table, where the unique id is not ''id''
I have a Model class like the following:
class Article < ActiveRecord::Base
set_primary_key "ARTICLE_ID"
end
however, using a link_to like the following (modified scaffolding),
the link has no id value:
<% for article in @articles %>
<tr>
<% for column in
2010 Mar 27
2
Shorter Rails 3 routes
Hi,
I have a small blog application, and I would like to shorten its routes.
Here they are:
Blog::Application.routes.draw do
resources :categories do
resources :articles do
resources :comments
end
end
A rake routes command produce the following lines:
GET
/categories/:category_id/articles/:article_id/comments(.:format)
2011 Dec 16
3
PROBLEN IN AJAX USING RJS
I am using rails 3. I have problem in out put so please tell me my
mistake
routes
-------
entermatch ''/view_article/:user_id/:article_id'' =>
''articles#view_article'', :as => :view_article
resources :users do
resources :articles do
resources :comments
end
end
article controller
------------------
def view_article
@user =
2006 Jun 20
2
Problem with "can''t dump anonymous class Class"
I submitted this earlier, but the web forums went down and I''ve screwed up
the thread, so I''m starting over.
I''m trying to built a document upload system. The system has a main
Document model with different subclasses for different types of documents.
With the code below, if I attempt to create a Document, it works fine, but
if I attempt to use one of the subclasses, I
2011 Mar 26
2
upload file, read first 10 lines.
I have a csv file and in my controller:
uploaded_file = params[:upload][:csv].read
@rows << FasterCSV.parse(uploaded_file)
I want to put in @rows only the first 10 lines but the read method
reads all the file.
How can I do?
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2006 Feb 21
6
Select articles from group with id ''1'' and id ''2''
I have to tables: "articles" and "groups". Between I have
article_groups as a jointable. Now I want to select every article who
is a member of group with id ''1'' and id ''2''. Whats best way to get
that?
Extract from schemas:
CREATE TABLE articles (
id int auto_increment,
ingress text NOT NULL,
story_text longtext,
constraint fk_items_users
2012 May 09
0
How to run this model using nonlinear least square in R.
http://r.789695.n4.nabble.com/file/n4619404/pic1.jpg
cesres_ext <- nls(lnGDP85~ intercept + (alpha/(1-alpha-beta)) *
lns_ikonngdelta + (beta/(1-alpha-beta)) * lns_ihonngdelta + 0.5 *
((sigma-1)/sigma) * (1/((1-alpha-beta)*(1-alpha-beta))) * (alpha * taylor1 +
beta * taylor2 - alpha*beta*taylor3) ,start = list(intercept=8, alpha=0.2,
beta=0.4, sigma=1.2),data=data)
I have this model. I use
2006 Jul 26
4
Upload File
I got this error:
NoMethodError in PictureController#new
You have a nil object when you didn''t expect it!
The error occured while evaluating nil.uploaded_file=
and the line code is here:
@picture.uploaded_file = @params[''picture_file'']
--
Posted via http://www.ruby-forum.com/.
2007 May 16
1
Rails, Mongrel and Rmagick
i have a rails app with a form that allows uploading an image file. I take
the image file and read it into rmagick to verify that it''s an image. For
some reason I can''t catch an exception thrown by rmagick inside the app.
After an invalid image file is uploaded the process just hangs. I have to
kill mongrel and restart to use the app again.
img =
2003 Mar 22
0
Where did the files go?
Hi All,
I am a newb to Rsync and I have a question. I am trying to back up our
main server to a remote server. I have rsyncd.conf on the remote
computer. I ran this command from the remote computer and it looked
great the whole 2 seconds it took to run....it said it completed but
now....I cant find any of the files on the remote server.
Here is my rsyncd.conf
#Global Options
#
motd file =
2006 Jun 19
3
can''t dump anonymous class Class
I''m trying to create a document upload system, where most of the code is
the super class Document and just the path to file on the system is
controlled by the sub classes. When I attempt to use my code, I get the
following when I try to save the document.
can''t dump anonymous class Class
Any ideas?
** Migration **
class CreateDocuments < ActiveRecord::Migration
def
2008 Jan 11
3
Date range queries return zero results
Hello,
I am having trouble getting data ranges to work correctly. I am using
the following command to load the db:
index << {:title => row[7].to_i,
:date => Date.strptime(row[3], ''%Y-%m-%d''),
:page_id => row[5].to_i,
:page => row[6].to_i,
:content_type => row[1].to_i,
2006 Mar 24
2
before_destroy not called
Hello, I''m trying to intercept delete call in my model but
before_destroy callback is never called...
Somebody knows why ?
Thanks
The controller :
def delete
Image.delete(params[:id])
redirect_to :action => "list"
end
The model :
class Image < ActiveRecord::Base
set_table_name "publish_images"
belongs_to :article
before_destroy :on_destroy