Displaying 20 results from an estimated 63 matches for "forum_id".
2008 Jul 20
2
Filtering results through URL (e.g. new?forum_id=3)
Is there a special code you have to place in the routes so filtering
results through the URL works?
For example, Ruby Forum does it with:
http://www.ruby-forum.com/topic/new?forum_id=3
http://www.ruby-forum.com/topic/new?forum_id=5
http://www.ruby-forum.com/topic/new?forum_id=7
etc.
Any ideas?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on...
2006 Aug 06
5
Return only results that user is allowed to see?
...are returned?
For instance, I don''t want to return results that are logically deleted
with acts_as_paranoid (deleted_at IS NOT NULL and deleted_at < now()).
Also, if a user is not an Admin, they should not be able to return
results that have a certain value in a certain column, like forum_id !=
13 (if 13 is an admin only forum).
What''s the best way to accomplish this? Do I need to include the
deleted_id and forum_id columns in my index, and then pass in the
appropriate search terms in the controller?
Right now, the model I''m search is Comment, and I have this def...
2006 Feb 13
4
FreeMIS 1.0 Released
...s any other big open source
projects using Rails so far - if nothing else, the availability of the
source code might be useful for learners looking for ideas?
If anyone would be interested in helping to develop FreeMIS, please get in
touch.
Details here:
http://sourceforge.net/forum/forum.php?forum_id=539444
Source code here:
http://www.freemis.net/svn/freemis/trunk
--
Robert Jones
jonesieboy[at]google''s-mail-thing[dot]com
2008 Jan 15
7
PHP indexing, what's the PHP method for indexscript
...t_data($postrow['pid']);
$doc->add_value(1,date('Ymd',$postrow['postdate']));
$doc->add_value(2,$postrow['author_id']);
$doc->add_term("XAUTHORID".$postrow["author_id"]);
$doc->add_term("XAUTHORNAME".$postrow["forum_id"]);
$indexer->set_document($doc);
$indexer->index_text($postrow['post']); //post == sample
// Add the document to the database.
$database->add_document($doc);
____________________________________________________________________________________
Be...
2006 Jun 28
15
Its here! RubyGems Release 0.9.0
Read about it here:
http://rubyforge.org/forum/forum.php?forum_id=7575
--
Posted via http://www.ruby-forum.com/.
2015 Aug 01
2
OT - parted guidance
parted fs resize is deprecated.
http://savannah.gnu.org/forum/forum.php?forum_id=6837
parted fs move can only move a partition into free space
https://www.gnu.org/software/parted/manual/html_node/move.html
The thing to do here is use gparted live or Fedora live media and
yum/dnf install gparted. It has a move/resize option that will do what
the OP wants.
Chris Murphy
2007 May 02
4
Wrong total_hits when using conditions in find_by_contents
...t;"
flash[:notice] = ''Please enter some words to search on.''
else
@conditions = " 1 = 1";
if params[:dateRange] != ""
@conditions += " and creationDate >= " + params[:dateRange]
end
if params[:forumID] != ""
@conditions += " and forum_id = " + params[:forumID]
end
@total, @topics = Topic.full_text_search(params[:query], {:page =>
(params[:page]||1)}, {:conditions => @conditions})
@pages = pages_for(@total)
end
it always return only 10 search results. no more search result. i don''t
know why!
and this article d...
2006 Oct 25
4
need help on special HABTM relation
hey all,
I have three tables like this:
forum (id,title)
usergroup(id,title)
forum_perms(usergroup_id,forum_id,read,write,post)
is there a way to deal with that kind of relation with rails such as by
using has_and_belongs_to_many kind of stuff?
thanx in advance
Pat
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby...
2007 Jul 18
5
Strange search result with conditions in find_by_contents
...on.''
else
@conditions = " 1 = 1";
if !params[:dateRange].nil? && params[:dateRange] != ""
@conditions += " and creationDate >= " + params[:dateRange]
end
if !params[:forumID].nil? && params[:forumID] != ""
@conditions += " and forum_id = " + params[:forumID]
end
# @total, @topics = Topic.full_text_search(params[:searchTerms], :page
=> (params[:page]||1))
@total, @topics = Topic.full_text_search(params[:searchTerms], {:page =>
(params[:page]||1)}, {:conditions => @conditions})
@pages = pages_for(@total)
end
end
end...
2006 Feb 03
2
acts_as_tree counter_cache behavior is different than API docs
...d "children_count" to hold the counter_cache. I have enabled this
option in my model. While writing tests I wrote a test for creating children
from the a parent:
message = @forum_message["parent"].find
child = message.children.create( "member_id" => 1, "forum_id" => 1,
"subject" => ''another subject'', "body" => "good grief.")
This follows the the API docs pretty closely at
http://ar.rubyonrails.com/classes/ActiveRecord/Acts/Tree/ClassMethods.html
However, the test fails for this reason:
4) E...
2006 Aug 30
7
AAF Sorting by date - what am I doing wrong?
...ot;id",:reverse => :true)
Sorting by id desc is really all I need, so if it''s easier to somehow
quickly sort by that, all the better.
Here''s my model:
class Comment < ActiveRecord::Base
acts_as_paranoid
acts_as_ferret :fields => [ ''comment'', :forum_id, ''mod_type'',
''user_id'', ''ferret_created_at'' ]
[...]
def ferret_created_at
created_at.strftime("%Y%m%d%H%M")
end
[...]
end
Any ideas as to what I''m doing wrong, or how to get this to work?
Thanks!
Ian.
--
Poste...
2008 Jan 04
5
Confused by the unit test results.
I''m testing the relation between two of my models: MessageThread
(parent), which has_many Message (children). When I run the following
test, it gives me an error:
---------------------------------
# test with a valid message
def test_valid_message_new
thread = MessageThread.new :title => ''awesome thread''
message = thread.messages.build(:body
2006 Jun 08
2
Activerecord Update syntax.
This what I have - sadly, it does not work :( .
posts = {params[:topic][:forum_id] => { "posts_count" => "posts_count +
@topic.posts_count"}, @topic.forum_id => { "posts_count" => "posts_count
- @topic.posts_count" } }
Forum.update(posts.keys, posts.values)
It''s suppose to subtract the posts_count from topic, and add...
2005 Oct 15
0
Making link_to use the routes I define
...se, so here are the relevant files (snippets):
messages_controller.rb:
def list
@forum = Forum.find(:all, :conditions => [''url_name = ?'',
params[:forum_url_name]])
if @forum.empty?
render_text "404: Not found"
else
for f in @forum
@forum_id = f.id
end
@messages = Message.find(:all, :conditions => ["parent_id IS NULL
AND forum_id = ?", @forum.id])
end
end
views/forums/list.rhtml:
<% for forum in @forums %>
<li><%= link_to forum.name, ''/'' + forum.url_name %></li&...
2015 Aug 01
2
OT - parted guidance
On Sat, Aug 1, 2015 at 3:34 PM, Robert Nichols
<rnicholsNOSPAM at comcast.net> wrote:
> On 08/01/2015 12:05 PM, Chris Murphy wrote:
>>
>> parted fs resize is deprecated.
>> http://savannah.gnu.org/forum/forum.php?forum_id=6837
>> parted fs move can only move a partition into free space
>> https://www.gnu.org/software/parted/manual/html_node/move.html
>>
>> The thing to do here is use gparted live or Fedora live media and
>> yum/dnf install gparted. It has a move/resize option that will...
2009 Nov 02
4
Ruby Gems version issue
Hi,
When I try to launch my ruby on rails server, it says my ruby gems
version is not up to date. However it is. I''ve even tried reinstalling
ruby gems to the latest version, but it still says I have an old
version. Does anyone know how to fix this issue? I''d be deeply
grateful.
Here is some code directly from my terminal (I''m on an ubuntu system):
2007 May 03
1
Numeric Range or comparision doesn''t work
...t;> puts index.process_query(''num:>2'')
num:{2>
=> nil
>> puts index.search(''num:>2'')
TopDocs: total_hits = 0, max_score = 0.000000 [
]
=> nil
According to the release note for Ferret 0.10.6 at
http://rubyforge.org/forum/forum.php?forum_id=9058, "Range queries just
work. No need to pad numbers or format dates correctly."
Is this a new bug?
Thanks.
Yaxm
--
Posted via http://www.ruby-forum.com/.
2008 Aug 16
2
Partial site generation
Thank you for providing excellent tools.
I''d like to know about the partial site generation provided by webgen 0.5.2.
http://rubyforge.org/forum/forum.php?forum_id=26516
> When a file that was in the menu changed, all files which
> included a menu with a link to this file got regenerated,
> too. However, that was not always necessary since the content
> of the changed file does not appear in the menu, only its meta
> information `title`. Theref...
2006 Feb 18
14
Composite primary key support in ActiveRecord?
Hi,
As I understand, composite primary keys aren''t supported in
ActiveRecord yet. May I ask if there are plans for this feature?
Better yet, if this feature is under development, how''s the progress
going?
I''m not trying to use legacy databases. I tend to think that using
multiple integer column id''s (composite primary key) are often
natural way to
2005 Sep 04
1
FW: Asterisk@home - requesting help on oh323, ISDN BRI and iConnectHere DID
I know almost nothing linux, and don't really know that much about Asterisk
(proper).. but I was 'pulled' by this subject and grabbed an
<mailto:Asterisk@home> Asterisk@home installation CD (version 1.3) and just
went with it. Newbie doesn't quite describe it, I'm a banker.. this simply
goes to show how easy Asterisk is becoming (I certainly hope this direction
was meant