If no one knows how with CardDav, anyone have experience with WebDav?
Andrew
On Jun 7, 8:09 am, Andrew Pace andrewpp...@gmail.com wrote:
Anyone have experience re-writing the rails router to add support for
a carddav service?
If you know of any resources, please send them my way.
Thanks
Anyone?
--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options,
Anyone have experience re-writing the rails router to add support for
a carddav service?
If you know of any resources, please send them my way.
Thanks!
--
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
Hi all,
I am trying to model with AR some tricky db tables.
The table names are in caps and any constraints below or next to the
column.
The tables:
USERS
id PK
username
etc
PROFILES
id PK
user_id FK references users(id)
name
unique (id, user_id)
TELEPHONES
id PK
user_id FK references
I recommend keeping the table. Let me explain why and try to explain
how to set it up better.
This type of information is known at the outset of the application and
it sounds like it is unlikely to change significantly over time. As
such it could be pulled into a domain table, similar to states
You are right that everyone seems to disagree on this point. I think
validating the data is one of the most critical parts of an
application. I tend to validate at the db level and model level to
ensure integrity (as the app is not necessarily the only point of
entry to the db--psql prompt,
Give us more code, because this can be done in a single step.
Chaining method calls like that will return a single department object
(e.department). So it should be no different, and I have done similar
things in the past without trouble.
The only time this shouldn't work is if you try
I believe that paperclip actually stores a copy of the images in the
public directory by default. Once the html is rendered to the browser
the image requests should not go through the rails stack.
Let us know what firebug says. Browser load times are dependent on
many factors, and often the
Looks to me that you don't have the right model relationships defined.
in order to do e.department.customers, the Department class has to
know about the relationship with Customers. You should have:
class Department AR::Base
has_many :customers
end
I think this should work, if everything
I assume you know this because you asked just for the structure, but
the rake commands that Rick points you at will get you what you asked
for, but not things like FK constraints, other constraints,
transactions, etc. It will give you the schema though.
Andrew
--
You received this message
Agreed with Jeff.
The AR models really act as a wrapper class to DB tables. This helps
to add an abstraction layer to SQL and marshall SQL selects into
powerful ruby objects (the best part, in my opinion). With that in
mind create non-AR models as needed, and only use the AR models when
the
I don't know Django, but it looks to me like you are trying to setup a
hash.
location_choices can be a local variable, instance variable, constant,
etc depending on your needs.
@location_choices = { AMS = Amsterdam, RTM = Rotterdam }
If you want it to be a constant, just capitalize it.
Local
You really need to give us more information to help. If you want just
the layout from the other action, you can use render. However, render
will not execute the code from the controller's action method; it will
only render the template. If you want to execute the code and truly
redirect, I
I agree with Colin above. Make a model level method to return the
data you wish to use in the view. Then within the view call
ValidValues.method_you_make.
Like he said, another option is to put this code in the controller,
but most of the time, the dropdown select menus have little to do with
There are many approaches to this problem. Some involve setting up
the code in the controller, others use a presenter. Google
presenter pattern for more info on that. The build method might be
what you are looking for. This is created as you define your model
relationships. If you use it, it
In development mode, it should not redirect to https://...
The default settings only enable that for production mode.
I would try to change that setting back to default so that it goes to
http://localhost/login.
This could be the problem if the rest of the site works.
Andrew
On Nov 14, 2:55
I assume that you have tried this but if not it is worth a shot. If
your model was filled with data prior to setting up ferret, then I
don't believe those rows will be indexed. You will need to build the
index or rebuild it. If you have not added any new data to the
database, you may very well
Configuring virtual hosts can get tricky the first few times you do
it. Slicehost has excellent articles on the subject.
http://articles.slicehost.com.
I go there often. Just look for the articles under your distro.
Andrew
--~--~-~--~~~---~--~~
You received
I agree with Marnen. The easiest way would be to just add a role
field to the user model.
I wouldn't mess with inherited classes or associations for what you
are describing.
But if you do, you really should use inheritance, as Marnen
described.
The only other table that I might consider would
I want to use logical models to aggregate data to present information
to the user. For example, I have a controller:
class OrdersController ApplicationController
def
end
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Sorry about above. The post should be:
I want to use logical models to aggregate data to present information
to the user. For example, I might have a controller that looks like
the following:
class OrdersController ApplicationController
def new
@order = Order.new
@address =
I too choose PostgreSQL by default.
Here are some of my reasons.
1) It adheres more reliably to SQL standard than MySQL.
2) PostgreSQL has a better query planner than MySQL.
3) The number value zero in MySQL is treated NULL.
4) The default settings for MySQL make it case IN-sensitive.
5) Until
Hey all,
I am having a little trouble getting some referential integrity tests
to work well.
Right now, I am using Postgres as my database. I have generated
migrations for my tables and ensured referential integrity by using
execute commands. All is working well at the level of the database
Another good link:
http://api.rubyonrails.org/classes/ActiveRecord/Transactions/ClassMethods.html
Andrew
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this group, send email
It is also good to know that the save and destroy methods already
use transactions to ensure before and after callbacks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this
Thanks so much for the feedback. Very helpful. I will be switching
my ways...
Andrew
--~--~-~--~~~---~--~~
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
I am currently have a 'products' table that has a :has_many
relationship with a 'photos' table.
I am uploading photos to accompany products. Right now, I upload the
photo, save the metadata to the 'photos' table and the image to the
filesystem. Then, I direct a url from within the products
, all the examples use numeric
values.
Any ideas?
Thanks,
Andrew Pace
-
% form_for(@product) do |f| %
%= f.error_messages %
p
%= f.label :name %br /
%= f.text_field :name %
/p
p
%= f.label :description %br
Please ignore. It was a problem with my migration file.
Thanks
--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To
I have a three table construct. A Users table. Users have a one-to-
one relationship with a Carts table for saving the contents of a
shopping cart to the DB. I have a Products table for holding
product information. The Carts have a many-to-many relationship with
the Products. (One cart might
know if this would be considered a poor way
of managing data in the rails way. It seems to me that it would
function similarly, in that it would save a lot of updates with the db-
migrations.
Thank you in advance for your help!
Andrew Pace
Here are the actual SQL statements for a real site
Thanks for your feedback.
It is possible to ensure certain formats for the text column prior to
saving it to a database. This makes querying this data quite easy in
fact. Just because the user entered in a form like 2/12/1980, doesn't
mean it has to get stored in that fashionI would hope
Also consider the demands of a very very rapidly changing field, like
medical informatics. In this area, many prefer the flexibility of a
key/value system because adding columns constantly would be a
nightmare. Think off adding columns for every new lab test, imaging
type, procedure, etc. This
Even a wikipedia article on it.
http://en.wikipedia.org/wiki/Entity-attribute-value_model
Andrew
--~--~-~--~~~---~--~~
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
Thanks
On Jul 31, 11:11 am, Marnen Laibow-Koser mar...@marnen.org wrote:
On Jul 31, 1:43 pm, Andrew Pace andrewpp...@gmail.com wrote:
Also consider the demands of a very very rapidly changing field, like
medical informatics. In this area, many prefer the flexibility of a
key/value
35 matches
Mail list logo