Displaying 20 results from an estimated 100 matches similar to: "Basic Many-to-One association"
2007 May 05
4
Stop words, fields, StandardAnalyzer quagmire
Hello,
I''m using: Ruby 1.8.6, Rails 1.2.3, ferret 0.11.4, acts_as_ferret from
svn stable.
I''ve had quite a day wrestling with trying to remove the use of
stopwords. The problem was that when searching for words like "no" or
"the", no results were found. I found a confusing thing behavior that
has taken me some time to figure out, and I hope sharing it
2008 Nov 26
3
New status_id in Facebook API - FIX
Hi,
I''ve had one of my application broken this morning (French time) with
this error :
NoMethodError (undefined method `status_id='' for
#<Facebooker::User::Status:0x2ad52d1c8478 @message={}, @time="0">):
It appear that Facebook API had change in the status : a status_id
node is new :
<user>
<uid>785637999</uid>
2006 Jul 03
1
how to get value from the post on the List page
Hi,
I''m new to Rails. I''m building a candidates tracking system for
recruiting. I have a List page, but instead of listing every candidate,
I only wanted to list the candidates in certain statuses. The first
time List page is hit, by default, it lists candidates in status < 9.
But on the List page, there is a dropdown where all the statuses are
listed, so that when user
2006 Jun 08
1
question about finding with :include versus nested dynamic finder (bad form? efficiency?)
I have a User model and a Status model. Each user is given a certain
status, either "Accepted", "Rejected", "OnHold", "Declined", etc. I
need to find all users with a status of "Accepted", so I''m doing the
following:
in User.rb:
belongs_to :status
def accepted_users
status_id =
2006 Aug 09
1
question about enforcing constraints in the model
I have a user model and a status model. Each user has a specific
status (accepted, rejected, declined, etc).
I have a form that allows the adminstrator to change certain options
for a user, including their status. I''m using a drop down menu
populated with the different status values, and a default option that
says "Choose a new status" with a value of "".
I want to
2007 Jul 02
8
Strange intermittent no search results problem
Hello,
First the specs:
ruby 1.8.6, rails 1.2.3, ferret 0.11.4, mongrel 1.0.1, mongrel_cluster 0.2.1
And the model''s aaf config:
# Ferret search engine
acts_as_ferret({:fields => {:name => {:boost => 10},
:summary => {:boost => 2},
:body => {:boost => 1, :store =>
:no},
2006 Jun 07
2
Are the find_ methods strictly a SQL thing?
I''ve had a number of occasions now where I want to find something in my
model that is not on the primary object. For instance I''ve got a class
Alert that has_one Status. Status has a "label".
I want to find all of my Alert objects and order the results
alphabetically by status label.
Can I do that without going into SQL? Right now I find myself doing an
2006 Mar 23
8
DRY principle - how to implement?
Hi all!
I have ''send_status'' table which looks something like these:
id code title
1 sent Sent
2 error Sending error
3 success Success
Next I would like to associate some processed records with their
''send_status''. Is it better to use:
1)
record.status_id = SendStatus.find(:one, :condition => "code=''sent''").id
to
2006 Apr 24
8
Application Design
I have a question about how to implement a design in Rails. I will try to make this as easy to follow as possible. First, let''s say that I have an ''Orders'' table that has different statuses. The 3 statuses that I want to track are ''Submitted'', ''Approved'', and ''Purchased''.
I also have 3 users of this application.
2006 Jan 31
2
find_by_sql question
I''m no good at SQL and I have a question that will hopefully be fairly
easy to answer.
I''m using acts_as_paranoid which instead of deleting a record adds a
deleted_at column with the datetime the row was deleted. I want to have
a find_by_sql filter out any row where deleted_at is not null.
I have (at least the relevant parts):
#a couple working filters here.
filters <<
2005 Dec 22
4
Is "case" a magic name
I''m a newbie.
My first app is using a table called cases. With just "scaffold
:case" I get the basic list to show up.
I just did a "generate scaffold case case" (I think that is correct).
Now when I try to list my cases, I''m getting a syntax error on all of
the view source code that references "case".
ie. <% for case in @cases %>
Thanks
2006 May 29
9
design recommendations for authenticating users with lots of different attributes..?
I''ve been struggling a bit trying to figure out the best way to
design/implement a system with authentication/authorization, and was
hoping some of you may be able to offer some advice..
At the moment, I have a system with 4 different types of users -
clients, administrators, sales_reps, and public_users. I''m using
"Authorizing Users with Roles" from the Rails Recipes
2010 Apr 07
3
Recommendation for searching with regards to timestamp & foreign key attributes
hi guys,
I need a recommendation for searching with regards to timestamp &
foreign key attributes. Sounds
a bit too much but here''s an example.
Suppose we have a "blog" object. It has many attributes such as
- title
- content
- status_id
- created_at
- updated_at
There are also "status" objects which have the following statuses,
"new",
2005 Aug 19
13
Enumerations (again): Comments please
Some of my earlier questions may have hinted ever so slightly in the
direction that I''m trying to implement "enumerations". By an
enumeration here I mean a class that has a fixed number of immutable
instances, which in turn have essentially only a name and a position.
Requirements I''ve tried to meet are
- Enumeration instances should only be loaded once from the
2006 Mar 08
1
Nil Object Error
I''m a complete newbie when it comes to Ruby on Rails. I have lots of
experience in PHP, but yesterday was the first time I sat down and began
developing using Ruby on Rails (I''m impressed!).
Anyway, I''m having a problem with edit/update of records when using form
validation. Here are my files for reference.
ticket.rb
============
class Ticket <
2005 Mar 08
1
Pluralization rules?
Is there documentation somewhere on how RoR handles pluralization? I''m
finding it head-scratching/table-thumping.
I''m playing with converting an old PHP app to RoR. I used to have a
table called "status_code" which was referenced by column "status". I
converted the "status" column to "status_id" and the table to
"statuses",
2002 Apr 01
0
[Bug 196] New: wront sent message id on upload
http://bugzilla.mindrot.org/show_bug.cgi?id=196
Summary: wront sent message id on upload
Product: Portable OpenSSH
Version: -current
Platform: All
OS/Version: other
Status: NEW
Severity: major
Priority: P2
Component: sftp
AssignedTo: openssh-unix-dev at mindrot.org
ReportedBy: chombier at
2008 May 13
4
calling another rjs file in an if condition
Hi
I have a controller action like below.This def is called by a
submit_to_remote
def edit_service_desk_status_after_transfer
if params[:transfer_reason].empty?
#This is used in the :failure of submit_to_remote
else
@sd_ticket = ServiceDeskTicket.find(params[:sd_id])
ActiveRecord::Base.transaction do
@sd_status_history = ServiceDeskStatusHistory.new
2009 Jul 29
0
Problem uploading file to database mysql blob field
Hi All,
Please help me ,I need to look into this issue asap, I need to change
the redmine functionality of uploading files to disk to upload them to
database. I tried suggestion on
http://dizzy.co.uk/ruby_on_rails/contents/store-file-uploads-in-database
but no luck , My form is multipart but still getting the error.
Please bare with me I am new to ruby and rails.
Here is the like for my
2006 Jun 18
10
acts_as_enumerated
Hello All,
Any one using acts_as_enumerated? I need help using (I like that it
caches values in memory)
I am working on a dating website and there are lots of options I want to
store as enumerated like
Status; divorce, single,
Sex: male, female
Eye color; blue, brown, green....
and lots more....
But I do not wanna keep them in seperate tables, and wanna keep them all
together.
Anyone has a