Displaying 20 results from an estimated 7000 matches similar to: "Ordering of subsets in a model."
2006 May 27
5
ActiveSupport JSON working?
Hi,
I am trying to convert a hash to JSON using ActiveSupports built in
.to_json. I am doing similar to the example below but are there
certain strings that could go in place of ''bar'' or ''rez'' that will
break the to_json method? I am using a very long string from rjs
output in place of ''bar''.
Perhaps .to_json is not ready yet?
Thanks,
Peter
2009 Aug 19
10
acts_as_list / acts_as_tree / acts_as_nested_set - which one
I am creating forum application which needs usage of acts_as_list or
acts_as_tree or acts_as_nested_set.
I am unable to decide among these. please could some one recommend from
their experience?
--
Posted via http://www.ruby-forum.com/.
2006 May 23
7
has_and_belongs_to_many question
Hello,
I am trying to make the "switchover" to programming my apps in Rails and
have a question about database structure.
In the past i would structure a many to many like this:
categories
----------------------------------------------------
| id | name |
----------------------------------------------------
1 Some Category
2 Another
2011 Feb 18
1
Rails plugins new official maintainers
Hey guys,
This is the final list of the new maintainers of each plugin.
We need two more things to do:
First please the owners of the repos add the rest of the maintainers.
Second I will add a note on each rails/plugin mentioning this repos updates.
So from now on, if someone else is interested in helping/contributing
please send a message to the appropriate repo owner.
verification
2006 May 30
2
acts_as_queue
wondering if anyone tried this patch. (i havent, seeing as its 1228
lines long, 10 months old, and cant take serious a patch many orders
larger than competing web frameworks)
in many cases i want to keep about 10 things around, eg recent searches,
new items (spanning multiple classes), referers, page views, without
logging them for perpetuity. so i guess this isnt a normal queue, more
like a
2006 May 10
12
Strange Behavior on Non-Index Pages
If I browse to \myRoRApp, I get the "Welcome aboard" screen.
I''ve done the ruby scripts/generate controller MyTest, and "Rolling with
Ruby on Rails" tells me I should be able to browse to \myRoRApp\MyTest
and see an error page, but what I''m actually seeing is a fastcgi config
file!
I have installed fastcgi, but apache can''t "see" the
2006 May 11
5
crating a ajax datagrid
hi,
Im looking to build a live data grid, where you can add delete rows
using dhtml.
and was just wondering if anyone is aware of any plugin''s taht may help
me.
Ive found this example but if anyone is aware of any other plugin''s
please let me know
http://unspace.ca/datagrid/update
thanks
scott
--
Posted via http://www.ruby-forum.com/.
2006 Jul 05
13
interactive web app
I have an arbitrary program written in any language, and it is a binary
(ie foo.exe), that will print out output to stdout constantly every 3-5
seconds.
Is there a way that I can have a web application designed in rails that
will print the output of this program to the browser every 3-5 seconds
in realtime, preferably even in an ajax manner.
thanks
--
Posted via http://www.ruby-forum.com/.
2006 Jan 16
2
acts_as_tree with Modified Preorder Traversal?
Has anyone extended Rails''s acts_as_tree to use the Modified Preorder
Traversal algorithm? This is a really clever trick for optimizing
access to trees stored in databases, as described lucidly in this
article:
http://www.sitepoint.com/article/hierarchical-data-database/2
It adds two integer fields, a "left counter" and "right counter", to
each row. By
2007 Dec 09
3
Managing Hierarchical Data
Hello,
I am in the process of trying to date hierarchical data in a MySQL
database and convert it into a treeview view JS scripting. As a beginner
to ROR there are still many unknown things to me, and handling this sort
of data is one of them. My question is this: Is there any built in
functionality for handling hierarchical data (via a MySQL DB) in
Rails/Ruby? If there is can someone please
2006 Apr 30
4
acts_as_ordered_tree
I need an ordered (sortable tree) and I just was thinking if somehting
like this is possible:
class Item< ActiveRecord::Base
acts_as_tree :order => "position"
acts_as_list :scope => ''parent_id = #{self.id}''
end
For my understanding mixing of two acts_as should be p?ssible, at least
in this case, right?
Unfortunatly the :scope is not working, I am not
2006 May 08
2
Noob Question - Variable Scope
I feel awful asking such a basic question, but here it goes....
I have a controller, "NewsController".
The user enters and the "list" action is called and I populate an
instance variable "@news" which contains all the elements I''d like to
display using a form.
The user then changes something and the "update" action is called.
Is
2005 Oct 12
2
Help with act_as_nested_set
Hi, I''m trying to get act_as_nested_set working, and I''m puzzled.
I googled the following
http://codefetch.com/cache?url=http://media.pragprog.com/titles/rails/code/r
ails-code.tgz
<http://codefetch.com/cache?url=http://media.pragprog.com/titles/rails/code/
rails-code.tgz&path=rails-code/ar/acts_as_nested_set.rb&lang=ruby&qy=ruby>
2006 May 10
2
gain value from form
I have the following form
<%= start_form_tag :action => ''rejectQuoteSave'', :id => @project %>
<p><label for="offer_reason_rejected"><span class="required">*
</span>Reason</label><br/>
<%= text_area ''offer'', ''reason_rejected'' %></p>
<%= submit_tag
2006 May 10
1
acts_as_nested_set does not work (in my case).
Hello,
I am using acts_as_nested_set. My problem is that the columns "lft" and
"rgt" get the value 0 if I create a new entity. If I delete an entity I
get negative values (-1, -2, -3) - but for all entities. Is there
anything missing? Is there any example for "acts_as_nested_set" in the
web?
--
Posted via http://www.ruby-forum.com/.
2006 Feb 06
2
acts_as_nested_set
Where can I see the API acts_as_nested_set constructs? I''ve read its
page in api.rubyonrails.com but I don''t see how to manage the tree
from there.
-- fxn
2006 May 08
7
How to get difference between two dates in days???
Hi,
I want to calculate difference between Current date & previous date
(stored in database). The difference should be in days. Hhow to do
that??
PLs tell me.
Thanx in advance.
Prash
--
Posted via http://www.ruby-forum.com/.
2006 Feb 07
2
Is acts as nested set safe in a concurrent environment?
Hi I was wondering if acts_as_nested_set can be used safely with
concurrently updates? The fact that so much of the tree needs to be
rewritten on inserts concerns me. Is anyone actually using it. I
noticed that the status of acts_as_nested_set was unclear at the time
the rails book was written.
Regards,
Glen
2009 Jun 21
1
cannot do mass_assignment when inherited class ?
I got the following error when trying to create the elibrary instance
(rdb:21) @elibrary = Elibrary.new(params[:elibrary])
RuntimeError Exception: Declare either attr_protected or
attr_accessible for Elibrary, but not both.
params : "elibrary"=>{"title"=>"bingo three",
"short_description"=>"something new",
2006 Jul 18
1
Bad values for acts_as_nested_set?
I moved from acts_as_tree to acts_as_nested_set because I need the
all_children method.
I''ve seen an alternative way to add this method to acts_as_tree here:
http://www.chuckvose.com/articles/2006/05/24/recursive-children
But I''d prefer to use the more efficient way of acts_as_nested_set (and
not to have to revert to my old code).
Anyway, here''s my issue: if I