Displaying 20 results from an estimated 2000 matches similar to: "AR foreign key problem."
2006 Aug 09
2
Gruff gives font-related error
Hello Railslist,
I''m trying to get Gruff running on OSX Tiger (intel) with edge Rails.
I''ve installed ImageMagick, Rmagick, FreeType and all their
dependencies, or so I believe. (I''ve compiled them from source mostly,
following a recent tutorial for Rails and ImageMagick on Intel Macs)
While following the sample on the Gruff downloadpage (the one with the
fruit), Rails
2006 Nov 04
1
acts_as_tree repeats
Hello Railslist,
I want to draw a simple single-table Acts_as_tree model.
I''ve read some articles about it and read the API docs, and now I''ve
got this running:
in controller I have:
---
def index
@pages = Page.find(:all)
end
---
in the model for Page I have ofcourse:
---
acts_as_tree :order => "position"
---
in the helper I have;
---
def
2006 Jul 14
1
Appending something to a Rails route?
Hello railslist,
I''m trying to accomplish the following:
The URL http://localhost:3000/page/news/edit
should redirect to the URL http://localhost:3000/login
I''ve accomplished this by setting up a route like:
map.connect ''page/:name/edit'', :controller => "login"
But this fails in the case of the following URL:
2005 Dec 16
6
Switchtower for production?
Hello,
The company that I work for will be developing a large webbased survey
(for a government institution) somewhere in Q1/Q2 of 2006. I''m
investigating the technological possibilities and Rails is certainly a
candidate. The survey application will have to perform under very high
peak load, and the exact specifications of the hardware are not known
at this point. I''m assuming
2006 Jul 12
2
(Re-)designing a CMS
Hello Rails-list,
I''m working on a CMS in Rails.
The company that I work for currently uses a CMS written in PHP, and I
want to mimick it in Rails, and improve along the way.
The PHP variant works with templates like this:
In the root of the webdir, there are the template files, named
cms_news.html for example.
This page contains custom tags, in the form of definitions and
2012 Aug 17
3
Rails doesn't validate create_model or build_model (has_one association)
I''ve got User has_one Shop. Rails is not validating when I tried
create_shop or build_shop, neither in the browser nor the rails console.
My code:
class Shop < ActiveRecord::Base
attr_protected :user_id
belongs_to :user
validates_presence_of :name, :primary_address, :city, :country_code,
:currency
end
class ShopsController < ApplicationController
before_filter
2008 Nov 01
2
stuck on a validates_presence_of unless issue
i have a person object. Persons don''t need to have addresses, but if
they have any address field value, they must have them all. So I have
something like this:
validates_presence_of :street_address, :city, :state, :postal_code
unless :address_blank?
address_blank? checks whether all of the address fields are blank.
If I run a test like this, it works:
describe "given
2006 Oct 25
5
How to use Webrick server
I am using Webrick to start my rails application.
Instead of using http://localhost:3000, i want to access
http://www.domain.com.
How can i achieve this using Webrick Server ?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to
2012 May 04
3
Database schema question
Im setting up a very basic rails app and have a question about the needed
migrations & associations.
Basically, my app is an occasion reminder service that emails users when
occasions that they select or input are coming up.
Occasions will be selected from a checkbox type list or alternatively
manually input by the user (name and date of the occasion).
Users can have_many occassions.
2008 Mar 24
2
render not able to locate template in publisher
Hi guys,
I have a publisher called UserPublisher setup in models directory of
my app. The reason I have it in a model is because its then possible
for me to invoke publisher methods in after_callbacks of my other
models, just the way we do it for ActionMailer.
My problem is that when I try to update a users profile specifying
location of the view template as a paramater to "profile"
2006 Nov 04
6
Javascript form validation for In place editting in scriptaculous ?
Is there a way by which I can do form validation for form generated by In
Place Editting of scritaculous?
The reason is, I want to avoid server roundtrip for checks which I can
perform at browser.
Regards,
Jatinder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060828/ca882668/attachment-0001.html
2006 Apr 17
1
Autocompleter to read value from hidden field
I have an autocomplete field with road names (looking up in a database with
approx. 100,000 road names).
To limit the number of roads, i want an extra input field where to put
postal code.
I''m currently using <%= text_field_with_auto_complete %> for the field.
What is the best way in Rails to intercept the Ajax call and send the value
of the postal_code field?
(I guess I could do
2006 Apr 23
2
Rails Recipes
Rails Recipes ... has got some very appetizing recipes. However, I have
a hard time starting. For example, the very first recipe,
InPlaceEditing, how and where do I run this code to create the table?
Thanks!
class AddContactsTable < ActiveRecord::Migration
def self.up
create_table :contacts do |t|
t.column :name, :string
t.column :email, :string
t.column :phone,
2006 Oct 11
1
Polymorphic Validations
Hi Everyone,
Ran into an interesting case last night, and I was hoping that someone
on the list here could give me some guidance.
I''ve got a Polymorphic association for Addresses (which can belong to
two different models).
The catch is, one model requires a strict, precise address, and the
other only requires a City, State and Postal Code.
I want to use :validates_presence_of :street,
2006 Jul 18
2
Write a new generator
Hi,
Could anyone point me to how to write a generator in Ruby?
I was going through code in ruby files at
\rails-1.1.2\lib\rails_generatorand found that it reads gems
specification to look for generator s present
on the system.
The way there are tutorials on how to create plugins for Rails, are there
any for Generators?
At the end of it I should be able to do something like this
ruby
2006 Apr 25
8
Does Rails suppports XHTML for views for inline SVG''s?
I have following piece of code(which when saved in a file with .xhtml
extension and opened in Mozilla 1.5.0.2 works fine);
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:svg="http://www.w3.org/2000/svg">
<head>
<title>SVG within XHTML Demo</title>
</head>
<body>
<p> You can embed SVG into XHTML, provided that your
2006 Jul 21
5
Reports in Rails
Hi,
In my rails application I want to include a reporting mechanism that will
allow the users of application to view statistics of various operations
graphically.
Does rails provide inbuilt reporting capabilities? what are different
appraoches I can follow to achieve reporting in rails?
On googling I found following as some of the options,
1.Gruff Graphs for Ruby
2.SVG
3. using Apache FOP.
2008 Jul 06
1
GeoKit / Form Validation
I am new to rails and have been scouring the web for the past two days
trying to figure out 2 things.
1) I am currently using a form with 2 models. The first is person, the
second is address. I attempted to duplicate the two models on one form
as seen in Advanced Rails Recipes and Railscasts, and they work fine -
except when there are validation issues on the address piece it just
returns saying
2006 Jun 16
2
RJS replaces JavaScript?
Hi All,
I am currently devleoping a Rails application and I need to do following as
part of client side operations,
1. HTML Form validations
2. AJAX
I am currently calling Javascript methods from views of my application; I
heard about RJS(Remote Javascripts) templates; are the replacing Javascript
altogether? can I use RJS for HTML Form validations and AJAX?
What I believe is that with RJS
2007 Nov 23
3
How to generate c1 and c2 reports for Rcov
Hi all,
I am implementing the Rcov stuff in my application and i was
able to generate c0 Report but i am in confusion about how to generate
c1 and c2 reports. Could some one please guide me for the same. Thanks a
lot in advance
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the