Displaying 20 results from an estimated 100000 matches similar to: "Custom Fields"
2006 Jun 21
0
how to save objects associated via has_many :through?
I recently converted a habtm relationship into one using
has_many :through. Some of my old logic relied on the ability to use
the #<< operator to add items to the relationship and get them auto-
saved. I''m curious to know the best way to do the same operation with
the has_many :through configuration. I looked through the list
archives and didn''t find my answer.
2008 Apr 17
0
Having problem with validates_presence_of fields in form when trying to also use ActiveScaffold (x-posted at ActiveScaffold group)
I have an events listing site that includes the models Event and
DateAndTime, so an event that happens more than once (like a high
school play) can have more than one date_and_time. The Event model
has_many date_and_times, and the DateAndTime model belongs_to event.
The Event model validates_presence_of two submission form variables,
the_date and the_time, and those variable values then get used
2006 Jun 22
0
how to save objects in a has_many :through association?
(I posted this yesterday but it never showed up on the mailing
list... weird.)
I recently converted a habtm relationship into one using
has_many :through. Some of my old logic relied on the ability to use
the #<< operator to add items to the relationship and get them auto-
saved. I''m curious to know the best way to do the same operation with
the has_many :through
2012 Jul 03
1
View with Variable Number of Fields
I''m a relative n00b when it comes to Rails. I''ve gone through Michael
Hartl''s tutorials (both editions, books and screencasts) and I can build a
basic CRUD web app without help. However, for a personal project I''m
working on, I''m lost as to how to move forward. Here''s the situation ...
I have a model called Project with two fields,
2006 Aug 16
1
Creating a comments system for multiple types of content
Hi all
My site has news entries, it has a party calendar and it has a blog.
Now I''d like to create a commenting system that in fact is quite simple,
but I wanna use it for all these 3 types of content.
My question: how can I do that? I maybe could add an association to all
three types in the comment model:
class Comment < ActiveRecord::Base
belongs_to :news_item
belongs_to
2006 Jul 21
0
has_many :through and form parameters
Hi,
The standard setup:
class Task:
has_many :studies, :class_name => "Study"
has_many :datasets, :through => "studies"
class Dataset:
has_many :studies
has_many :tasks, :through => ''studies''
class Study:
belongs_to :task
belongs_to :dataset
Now, if I have an edit view for my Task, is it possible to set up the
form so that in the
2006 Aug 17
1
How to sort child table on fields in the associated parent
For an Xray file system patients have folders and folders have studies.
That is:
patients folders studies
id id id
name patient_id folder_id
... label type
... ...
The list of studies with their associated folder and patient might look
like this:
name folder_label study_type
2006 Apr 24
0
Updating a form containing array of text fields with has_many/belongs_to relation?
I''ve got a User class and an Employer class set up as follows:
User.rb:
has_many :employers
Employer.rb
belongs_to :user
My tables are as follows:
mysql> select id,first_name,last_name from users limit 5;
+-----+------------+-----------+
| id | first_name | last_name |
+-----+------------+-----------+
| 711 | Patrick | Stewart |
| 714 | Larry | Davis |
mysql>
2009 May 11
0
updating join table (HMT) with checkbox and extra fields
Hi,
I''ve been breaking my head over this thing with no success. Here is my
table layout -
class User < AR
has_many :memberships
has_many :groups, :through => :memberships
...
class Group < AR
has_many :memberships
has_many :users, :through => :memberships
...
class Membership < AR
belongs_to :user, :class_name => "User", :foreign_key =>
2020 Feb 14
0
Dovecot Proxy - Oauth2 mech add custom fields
Hi,
I have a problem with configuring dovecot passdb for Oauth2 with keyclock.
A user can access more mailbox, mailboxes are associated with the user.
When a user login with this method:
OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ AUTH=PLAIN] Dovecot ready.
a login mailbox*user password
Dovecot when requiring the grant_url send to Keyclock, for example, this post
2006 Apr 07
0
Custom Non-ActiveRecord Classes or not...
Say I want to gather info from various Models... Files, Folders, and put
them into a ''display'' Object DisplayFilesystem that will standarize the
info from both tables (for display only)...
Class DisplayFilesystem
attr_accessor :item_id, :name, :type, :description, :date
def initialize
@item_id = @name = @type = @description = @date = nil
end
end
So in the code side
2007 May 12
1
Custom form fields in tracker?
Hello,
I was just reading the following bug ticket:
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=10744&group_id=797
I notice that you devs have to repeat yourselves quite a bit about
requiring the different types of data that are required to diagnose
bugs. Could you modify the RubyForge tracker to accommodate this
information? You could even make them all required
2011 Nov 12
3
complex form with dynamic fields.
I''ve seen http://railscasts.com/episodes/73-complex-forms-part-1,
part2 and part3.
It seems to be my case.
I have:
Company
has_many :documents
has_many :tenders, :through..........
and
Document
belongs_to :company
Tender
has_many :companies, :through..........
I want to insert documents and tenerds on company creation.
If documents are more than one the user can click "add
2006 Apr 29
2
Seeing performance problems with has_many :through relation
Greetings all, I am looking for some insight from some of the more
experienced with has_many :through relationships as I am having a hard
time reconciling the performance I am seeing.
I have 2 tables that are linked together via has_many :through
Table 1: urls ( there are about 7,000 records )
2 fields, id and url
Table 2: phrases ( there are about 87,000 records )
2 fields, id and phrase (w/
2006 Jul 02
3
Multiple terms accross multipl fields and associated tables
I''m looking for a good way to search a few fields accross multiple
asociated tables (i.e. find ''friends and family'' accross Photo.name,
Photo.description, and Tags.name where Photo has_many tags). And,
ideally there''s a competent query analyzer/parser.
I''ve expirimented with constructing my own SQL using ... LIKE %term1%
... etc, but the
2006 Mar 10
1
Validate fields and display errors from two models?
Hi,
I have here a problem I''ve been working at for a little while but I
can''t seem to get the error messages to appear correctly.
My form looks something like this for "ModelA":
[errors_for "modelA"]
[form for "modelA"]
[text "modelA" "fieldname1"]
[text "modelB" "fieldname2"]
[submit]
[/form]
The reason
2007 Jun 24
6
I only want one type of model returned from a multi_search
I am trying to use acts_as_ferret''s multi_search to search across
multiple models, but i only want it to return one type of model.
for example i have a page that lists out people. on this page it shows
email addresses and phone numbers. I want to be able to search by any
fields directly from the person model and search the fields from the
email_address and phone_number models, but I only
2007 Dec 25
1
cdr_adaptive_odbc and custom rdms fields
Hi folks,
I was recently made aware that the only way to currently set custom fields
in a relational database for CDR is via the experimental cdr_adaptive_odbc
drivers found here:
http://svncommunity.digium.com/view/tilghman/branches/1.4/cdr_adaptive_odbc.c?view=log
I had no problem compiling the driver, and copied the module to
/usr/lib/asterisk/modules on my box and setup
2007 May 04
2
Custom Matcher and NAME NOT GENERATED annoyance
Hello RSpec users,
Have been using RSpec since 0.8.2 (not too long ago, I must say). and
been creating my custom matchers since was defined as "good practice".
Also, auto-generated names for the examples is very helpful, I''m
trying to take advantage of it.
Since I often prior code/define all the "examples", I have created a
few matchers to fulfill associations and
2017 Sep 05
0
LDAP Account Manager 6.1.RC1 with custom fields extensions
LDAP Account Manager (LAM) 6.1.RC1 - September 5th, 2017
========================================================
LAM is a web frontend for managing accounts stored in an LDAP directory.
Announcement:
-------------
Input fields are now trimmed before sending to avoid leading/trailing
spaces. LAM Pro custom fields support minimum/maximum entries for
multi-value fields. There is also a new field