Displaying 20 results from an estimated 700 matches similar to: "active scaffold polymorphic model"
2009 Feb 20
6
How to mock an object defined in the before_filter function?
Hello,
I am trying to implement the following scenario, but I am stuck ...
The thing is I want to initialize a variable @comment when the stub
function "find_comment" is called.
The way I do it below doesn''t work, since
"before_filter :find_comment" returns true/false and @comment
initialization is done inside it. Could you please give me a hint how
to do it?
One
2008 Jan 30
1
Import XML in mysql
Hi,
I am using scrubyt for scraping a webpage. The output is xml:
Example:
<root>
<item>
<item_name>Canon Vertical Battery Grip BG-E3 For EOS Digital Rebel
XT</item_name>
<price>$179.00</price>
</item>
<item>
<item_name>Canon Vertical Battery Grip BG-E4 For EOS
5D</item_name>
2013 Jun 04
0
[PATCH] Btrfs-progs: fix incorrect root backref errors in fsck
A user reported that fsck was complaining about unresolved refs for some
snapshots. You can reproduce this by doing
mkfs.btrfs /dev/sdb
mount /dev/sdb /mnt
btrfs subvol snap /mnt/ /mnt/a
btrfs subvol snap /mnt/ /mnt/b
btrfs subvol del /mnt/a
umount /mnt
btrfsck /dev/sdb
and you''d get this
unresolved ref root 258 dir 256 index 2 namelen 1 name a error 600
because snapshot b has a dir
2009 Jun 12
2
Automate a data load and merge
Hi R list,
I would like to automate, or speed up the process from which I take
several separate datasets, stored in .csv formate, import and merge
them by a common variable. So far I have greatly sped up the loading
process but cannot think of a way to automate the merger of all
datasets into a common data.frame.
My apologies if this has been covered, any R search suggestions are
2006 Mar 10
5
PDF::Writer Simpletable Iteration
Hello All:
I have been working with <a
href="http://ruby-pdf.rubyforge.org/pdf-writer/index.html">Austin
Ziegler''s PDF::Writer</a> as a means to produce PDF documents from my
Rails app. I am stumped on how to iterate through a collection of items
and output them in a table format. The way I have tried it so far only
returns the last item in the collection -
2007 May 17
1
exec format error
Hi
I have been using backgroundrb version 0.1 for a while. Unfortunately, I
have to develop on windows :(
It has worked fine for a while. However, this morning I started up and old
app that worked fine and get this error.
exec format error
from running --trace I see that the error comes from backgroundrb_tasks.rb
line 59 which reads:
59 `#{scripts_src}/start -d`
Here is the context.
desc
2007 Feb 14
1
cron like behaviour?
Hi
I have previously used railscron for server-side manipulation of the
database but had a heap of trouble working with it.
BackgrounDRB was suggested to me by a friend.
I upload some files via acts_as_attachment and these go lie in a dir
structure that i desire. What I want from the background process is to
periodically (not user initiated) do some file-structure manipulation i.e. I
want to
2011 Nov 07
1
RpgSQL row names
Hello,
Using the RpgSQL package, there must be a way to get the row names into the
table automatically. In the example below, I'm trying to get rid of the
cbind line, yet have the row names of the data frame populate a column.
> bentest = matrix(1:4,2,2)
> dimnames(bentest) = list(c('ra','rb'),c('ca','cb'))
> bentest
ca cb
ra 1 3
rb 2 4
>
2006 Jul 29
0
SOAP for large datasets
I''ve been playing around with a soap interface to an application that
can return large datasets (up to 50mb or so). There are also some
nested structures for which I''ve used ActionWebService::Struct with
2-3 nested members of oher ActionWebService::Struct members. In
addition to chewing up a ton of memory, cpu ulilization isn''t that
great either. My development
2013 Jan 25
3
how to delete the null elements in list
HI,
I have the list:
> suu
[[1]]
NULL
[[2]]
NULL
[[3]]
item_id prod
1 2
[[4]]
item_id prod
1 2
2 4
how to delete all "NULL" elements from suu to get only
>suu
[[3]]
item_id prod
1 2
[[4]]
item_id prod
1 2
2 4
??
Kind regards,
Tammy
[[alternative HTML version deleted]]
2006 Dec 11
2
join and sort on 'best match'
Hi Everybody,
I have been breaking my head on the following problem: how to join 2
tables and sort the results on the best match.
explanation:
- there are 3 tables, items, tags and items_tags. The items_tags table
links items to tags.
- I have one item which has certain tags, and I want to look up all the
other items that have those tags as well
- results should be sorted and presented by
2006 Dec 05
0
[779] trunk/wxruby2: Added TreeCtrl#traverse method and documentation
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding:
2006 Mar 07
0
Making AR attriibutes private
Hi,
Can anyone tell me the syntax to make AR attributes private so that they
can only be set through an object''s constructor?
I want do something like this, where item_id and rated_by are private
and set only through the constructor:
# Schema as of Mon Mar 06 21:22:59 BRT 2006 (schema version 15)
#
# id :integer(11) not null
# item_id :integer(11)
2006 Jan 19
0
Strange thing with ActiveRecord ??
Hi
I am probably missing something, so please help:
I have a table called ''zipped_responses'' with an ''item_names'' varchar column.
I want to create a comma separated string of ''names''.
I have an ''add_item_names'' method which takes a ''name'' and put it at the end
of a string with a preceding comma.
The
2006 Dec 23
0
[797] trunk/wxruby2/swig/classes/TreeCtrl.i: Traverse method moved to wxSugar
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding:
2006 Mar 22
1
updating multiple attributes
I have a store administration tool I''m trying to build.
One view is an item view. Each item can have many attributes.
Example:
item: bike
item_id: 2333
attribute: id: 3 #auto-increment
item_id: 2333 #primary key
attribute_type: wheels #a type of attribute
attribute_order: 1 #the order it
2006 May 27
2
Error, in my store provider.
Let me explain the subject title, store provider is Hackey, he''s a NPC
that sells items to my users.
<h1>Welcome to Hackey''s!</h1>
<h3>Catalog</h3>
<table border="2" bordercolor="red">
<% for items in @items -%>
<% temp12 = Item.find(items.item_id) -%>
<tr><td><%= @temp12.name
2007 Mar 04
3
Dynamically setting the image directory used by attachment_fu
It took me a while to figure this out and I don''t see any wiki pages
for attachment_fu so I figure I would just post this here.
I didn''t like the way attachment_fu by default creates directories
under a given directory for a specific class e.g.
item_image/1/img_1.jpg
item_image/1/img_1_thumb.jpg
item_image/2/img_2.jpg
item_image/2/img_2_thumb.jpg
item_image/3/img_3.jpg
2008 Mar 31
2
How can I make a textbox uneditable?
I want to make this textbox indeitable but im not sure how to use ruby
to do this can anyone help?
my textbox:
<%= f.text_field :item_name %>
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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 May 03
2
render partial collection
my view contains a call to a partial:
<%= render(:partial => ''item_list'', :collection => @keyword.synonyms,
:locals => { :action_delete => "removesynonym", and_some_other_stuff
})
%>
_item_list.rhtml contains:
<%= link_to (
image_tag(''/images/deletebutton.png''),
{ :action => action_delete,
:id =>