Why does Child even have the family_id attribute? Can't you get the
child's family through it's person (parent)?
Unless the child can belong to a different family than the person,
this is an unnecessary association.
Anyway, that doesn't really answer the question.
accepts_nested_atrributes_for
http://rapidlinks007.blogspot.com/
http://rapidlinks007.blogspot.com/
http://rapidlinks007.blogspot.com/
http://rapidlinks007.blogspot.com/
http://rapidlinks007.blogspot.com/
http://rapidlinks007.blogspot.com/
Visual Studio 2010 Training Course And Video Tutorials
Download torrent --- *Visual
Setup:
I have 3 drop downs generated by collection_select, where in the next
drop down's option values are dependent on which option value was
selected in the previous drop down. This is done using observe_field.
e.g.
country = state = city
Here's the code:
%div
.label
Grading Scheme
I'm working on a new version of authlogic_oauth that will use
oauth2...
I think it's what you are searching for...
It will be released at the end of the week, keep eyes on
http://github.com/potomak
On May 8, 3:52 am, Alex a...@liivid.com wrote:
Rpx might be good for some people. It's a single
On 19 May 2010, at 06:33, badnaam wrote:
I have a form with a select box and there is a div under the select
box that gets populated with data collected via ajax, based on the
value selected in the select box. I use an observe field to accomplish
this. It all work pretty well except, let's
You need to add a bang to the create methods for the addresses so that
an exception is raised. Rollbacks only happen if an exception is
raised.
ActiveRecord::Base.transaction do
# (...)
@dealer.addresses.create!(params[:mailing_address])
On 19 May 2010, at 00:08, Philip Hallstrom wrote:
Good to know. That won't help with the authenticity token though...
Indeed, our swfuploads are completely separated into reusable
Javascript objects, so I didn't think of it anymore.
Note to self: don't answer mailing list replies while
On May 19, 2:36 am, brianp brian.o.pea...@gmail.com wrote:
BUT the page gets rendered as an
edit_dealer_id page. with a new hidden field telling the form to
submit via put method.
I dont really unserstand what you're saying. What are you expecting to
get rendered, and what is actually getting
If ActiveRecord were to know that it's supposed to create an habtm
association to another object simply because a foreign_key is present
in the attributes hash of the new object, then I think that would
create a lot of overhead in the create method, and it's a bit too much
magic in my opinion. On
hello,
I want to make a table within a form by making a new form_tag. The
following code in ApplicationHelper fails:
def tabular_form_for(name, object = nil, options = nil, proc)
concat(table, proc.binding)
form_for(name,
object,
(options||{}).merge(:builder =
hello,
I want to make a table within a form by making a new form_tag. The
following code in ApplicationHelper fails:
def tabular_form_for(name, object = nil, options = nil, proc)
concat(table, proc.binding)
form_for(name,
object,
(options||{}).merge(:builder =
Hi guys. So I have a few models: Concept, Entity, Dimension, Rating,
User and Fact
1) Concepts can have many dimensions and many entities and many facts.
2) Concepts may share dimensions, but not entities or facts (so the
Concept universities can share the Dimension quality but not the Fact
Thanks for your help. My faith the Unit Test *really* works is
strengthening :-)
On May 18, 12:56 am, frogstarr78 frogstar...@gmail.com wrote:
The problem is that the function crud_views_as_a_string is not defined
(GenModCRUD.rb:22:` def crud_views_as_a_string') to take an argument.
But in
How do you define which version of the database is populated via the new
default seed process? Running this:
rake db:seed
runs the code in seed.rb in the development environment and therefore
loads the seed data into the development database.
What is the syntax to use seed to populate the
I want to create a table displaying image thumbnails, 3 per row.
Can I use an if loop to create the tr tags?
or is this better acheived with css?
--
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 me it looks like you are doing way too much abstraction here. With
model names like Concept, Entity and Dimension it is going to be
extremly hard for anybody else to wrap their heads around what exactly
you are trying to design. At least I can't do it, and hence I cant
really give any advice
On 19 May 2010 13:20, the batman li...@ruby-forum.com wrote:
I want to create a table displaying image thumbnails, 3 per row.
Can I use an if loop to create the tr tags?
if doesn't produce a loop - it's just a conditional check.
Assuming your images are stored in an array, you can use any of
Hi everyone,
The call for proposals is open for Acts as Conference 2010. This year
we're focusing on software craftsmanship, Agile, web development, and
of course the leading edge in the Ruby on Rails world. We're going
even bigger than last year, with a full day of hands-on workshops, and
two
one more info:
the code above works when I create a new parent (and either create a
new child or choose an existing one in the nested form).
The code doesn't work when I edit the model and choose an existing child
record (the association won't be created), any hints?
--
Posted via
* you could (if you like it clunky) just use .each maintain your own
counter and do your next row operations when it gets to a multiple of
3
I think that's what I was trying to do, though I didn't know how to get
a new table row
was I on the right track?
table
% @photos.each do |photo| %
%
hi
invite belongs_to location
location has_one invite
background: location is not set at the time of the invite...
i = invite.find(1)
how do i build the location and update the invite (location_id) in
one go? (build doesnt set the foreign key for me..)
loc = i.build_location(:title='test')
None of those will give you SAML identity provider functionality. They
are both SAML service provider interfaces.
- Christian
On May 18, 6:32 pm, Reynard reynar...@gmail.com wrote:
Hi there, thanks for releasing this toolkit. Does supports both
service provider and identity provider initiated
On 19 May 2010 13:59, the batman li...@ruby-forum.com wrote:
* you could (if you like it clunky) just use .each maintain your own
counter and do your next row operations when it gets to a multiple of
3
I think that's what I was trying to do, though I didn't know how to get
a new table row
rake db:seed RAILS_ENV=production
On May 19, 6:15 am, Rob Nichols li...@ruby-forum.com wrote:
How do you define which version of the database is populated via the new
default seed process? Running this:
rake db:seed
runs the code in seed.rb in the development environment and therefore
Use a form builder. See the api doc.
On May 19, 3:04 am, poseid mulder.patr...@gmail.com wrote:
hello,
I want to make a table within a form by making a new form_tag. The
following code in ApplicationHelper fails:
def tabular_form_for(name, object = nil, options = nil, proc)
Not sure that you would want to do this but you can
a = (1..20).to_a
until a.empty?
x = a.slice!(0,3)
puts x.inspect
end
Gives
[1, 2, 3]
[4, 5, 6]
[7, 8, 9]
[10, 11, 12]
[13, 14, 15]
[16, 17, 18]
[19, 20]
so you could have
table
% until @photos.empty? -%
% x = @photos.slice!(0,3) -%
tr
%
% @photos.in_groups_of(3, false) do |group| %
tr
% group.each do |photo| %
td%= photo.filename_or_whatever %/td
% end %
/tr
% end %
or something relatively close to that
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google
tshim wrote:
rake db:seed RAILS_ENV=production
Thank you.
--
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 this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe
RichardOnRails wrote:
Thanks for your help. My faith the Unit Test *really* works is
strengthening :-)
Excellent! When you get a chance, try RSpec, see how much nicer it is,
and watch yourself achieve enlightenment!
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
--
frankjmat...@gmail.com wrote:
where can i find the documentation for all of the
action_controller_path functions?
multiple submits on a form are no longer a viable solution because the
only way to tell which one was hit was to know the name value of the
submit button.. when its in different
Hi there
I try to use form_tag form_tag( post_path, :method = :put)
to generate form action='/posts method=get
But I got the following code
form action='/posts?method=get method=post
I am in rails 3.0.0 beta 3
Any one have the same situation? would you like to tell me how to fix
it?
Does anyone have any suggestions about building a plugin architecture for a
Rails application?
This would be different from the Rails plugin architecture; this would be
plugins for my Rails application in particular (i.e. like Firefox
extensions, or OpenOffice extensions)
--
yeah, i've read it half a dozen times - doesn't give me any insight on
the argument list for the _path family of functions and apidock is
less than helpful as well.
searching through google led to some obscure blog that said i could
do:
link_to 'do something', station_path(@station, :station =
had the same problem, any solutions ?
--
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 this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send
daphonz wrote:
Have you tried using:
rake db:migrate RAILS_ENV=production
-c
On May 18, 12:35�pm, Jorge alejandro Mendoza torres li...@ruby-
I already tried the instruction and the migrations were made in the
production database.
But I have another problem, I had a record and I
frankjmat...@gmail.com wrote:
yeah, i've read it half a dozen times
Read *what*? Please quote when replying so it's clear what you're
responding to.
- doesn't give me any insight on
the argument list for the _path family of functions and apidock is
less than helpful as well.
Are you
Aerodame wrote:
Due to some corporate firewall difficulties I decided to go to my home
Mac and install the plugin in a rails project and then just copy the
plugin from the vendors/plugin folder to my (inside) corporate
project.
Is there a special registration that needs to take place
Expecting to get rendered: The same form page I've created at the :new
action with the Invalid model notices from my model validations.
What is getting rendered: A form that LOOKS the same, with my Invalid
model notices but now does not POST to the :create action. The form
has magically changed
On May 19, 11:29 am, Marnen Laibow-Koser li...@ruby-forum.com wrote:
frankjmat...@gmail.com wrote:
yeah, i've read it half a dozen times
Read *what*? Please quote when replying so it's clear what you're
responding to.
I have read the rails routing guide a dozen times.
- doesn't give me
frankjmat...@gmail.com wrote:
[...]
In any case, the arguments are whatever is defined in that particular
route. �Run rake routes or look at your routes file to see what that
would be.
That doesn't make any sense.
Whether it makes sense or not, it is the case. :) The arguments are the
Yeah the objective protecting the foreign keys are not letting the
Users make the changes. Maybe an admin of the app could say a person
or child has changed families (parents do split up). But we don't want
some smart child using curl and changing his family to any family id
he wants on his own.
On 19 May 2010 16:09, Jorge alejandro Mendoza torres
li...@ruby-forum.com wrote:
daphonz wrote:
Have you tried using:
rake db:migrate RAILS_ENV=production
-c
On May 18, 12:35�pm, Jorge alejandro Mendoza torres li...@ruby-
I already tried the instruction and the migrations were made in
On 19 May 2010 16:44, brianp brian.o.pea...@gmail.com wrote:
Expecting to get rendered: The same form page I've created at the :new
action with the Invalid model notices from my model validations.
What is getting rendered: A form that LOOKS the same, with my Invalid
model notices but now does
I have the following in my en.yml
en:
hello: Hello world
activerecord:
errors:
models:
et:
not_enough: Not enough points for this transaction
when I call I18n.t :not_enough in my custom validation method in model
Et, I get a translation missing error. I have
Hello, I'm new to Ruby on Rails.
I am creating a form for searching purpose:
% form_for :src_cond,
:url = {:action ='search'} do |p| %
%= p.radio_button(bd, 1) % a
%= p.radio_button(bd, 2) % b
%= p.select :bd2, %w[1 2 3 4],{},{:index=nil} %
%= p.submit Search %
% end %
Hi!
Assume I have a model named Thread.
Normal users should be able to change the attributes [title, body].
Admin users should be able to change [title, body, sticky, ...].
Now I wonder what's the corrent/best way to restrict/control access to
certain model attributes depending on the current
Yes I have that's how I know it's changing the form method to PUT to
dealer/id/edit. It's also adding an id of: edit_dealer_id_{#number}
where {#number} is an actual digit.
On May 19, 9:38 am, Colin Law clan...@googlemail.com wrote:
On 19 May 2010 16:44, brianp brian.o.pea...@gmail.com wrote:
Thanks for the reply, So I guess there is no ruby implementation for
SAML IdP service yet (or at least not open source one).
- reynard
On May 19, 5:43 am, ChristianP christian.b.peder...@gmail.com wrote:
None of those will give you SAML identity provider functionality. They
are both SAML
Well like I said, I am trying to figure out how to use an abstract
class to access a separate database. I understand why calling the
object attribute is not working, what I am looking for is the proper
way to interact with the separate database. If an abstract class is
not the way, what is? If not
I'm trying to run an existing project on a new installation of Rails
on a Windows 7 machine. When I try to load the schema, I get:
rake aborted!
undefined method `full_name' for \377\376-:String
I can't figure out what is causing the error. My best guess is some
kind of gem conflict, but
Guys,
I have created a new controller Worker which has a method
do_work(inputs), and another method show_work, which has a meaningful
associated view (showing the results of the 'work'.
So, I need to display the result of show_work in the view of another
class called Consumer.
So, I need to do
What are you trying to achieve with {:index=nil} on the select
helper?
%= p.select :bd2, %w[1 2 3 4] % should work
On May 19, 5:28 pm, N.Li chunnim...@gmail.com wrote:
Hello, I'm new to Ruby on Rails.
I am creating a form for searching purpose:
% form_for :src_cond,
:url = {:action
I am calling a partial in another controller (benefits) like..
%= render :partial = benefits/b_index, :collection = @benefits,
:locals = {:hide_list = true} %
in the partial i just cant seem to access the local variable
% if hide_list == true % throws unknown variable error and % if
On Wed, May 19, 2010 at 11:07 AM, chewmanfoo chewman...@gmail.com wrote:
Guys,
I have created a new controller Worker which has a method
do_work(inputs), and another method show_work, which has a meaningful
associated view (showing the results of the 'work'.
So, I need to display the
On Wed, May 19, 2010 at 1:50 PM, Kim kim.gri...@gmail.com wrote:
Well like I said, I am trying to figure out how to use an abstract
class to access a separate database. I understand why calling the
object attribute is not working, what I am looking for is the proper
way to interact with the
In any case, the arguments are whatever is defined in that particular
route. Run rake routes or look at your routes file to see what that
would be.
That doesn't make any sense.
Whether it makes sense or not, it is the case. :) The arguments are the
:parameters in the route.
But I've
regarding the class method you mentioned, then I can run the
Worker.do_work(inputs) method by calling Worker.do_work(inputs)?
On May 19, 1:20 pm, Conrad Taylor conra...@gmail.com wrote:
On Wed, May 19, 2010 at 11:07 AM, chewmanfoo chewman...@gmail.com wrote:
Guys,
I have created a new
amit_pandya wrote:
This things happens because of version conflict of authlogic, either
upgrade or remove current one and install old one
Adam Hill wrote:
Hi, I had the same issue - I think it has something to do with the
latest version of Authlogic possibly requiring Ruby 1.9???, whereas
What chewmanfoo is talking about is moving code from the controller
into the model. Basically, the consumer controller would call the
worker model (if one exists), not the worker controller. When you're
in a situation where you need to run two or more controller actions on
the same request then
To clarify:
Some of the data for my rails app is stored in a non-rails DB table. I
need to query this other database and then show the data in the rails
app.
I have a model (have tried with abstract class and without) Computers
that is connected to the non-rails DB with establish_connection.
So I have an action that results in atom:
def index
...
respond_to do |format|
...
format.atom { render :layout = false}
end
end
Then I have a builder template to render the atom, called
index.atom.builder.
Inside this builder template, I'd like to render one of my existing html
Hello
I am reading Agile Web Development with rails (third addition).
And I need some help with it.
I have reached chapter 9.3 (AJAX)
when I press on the add to cart button I get an error message.
a real ugly one.
eventually, I downloaded the PDF version and copied the content of the
files but
frankjmat...@gmail.com wrote:
In any case, the arguments are whatever is defined in that particular
route. Run rake routes or look at your routes file to see what that
would be.
That doesn't make any sense.
Whether it makes sense or not, it is the case. :) �The arguments are the
I have this application installed on my computer
apache HTTP Server 2.2
Ruby 1.8.7
Gems
Rails
Mysql 5.1
in appache configuration file i made some change:
From: Options Indexes FollowSymLinks
To: Options Indexes FollowSymLinks ExecCGI
unmark AddHandler cgi-script .cgi .rb
Then i go to
No. It has *nothing* to do with appearance. PUT is for updating an
existing resource (generally through a form).
and i am updating a resource... i'm not using #update_attributes, but
in my controller I am saving.
I think that the need for a PUT link does not exist, period. If your
app is
by far the easiest way to use rails with apache is to use passenger:
http://www.modrails.com/
On May 19, 3:02 pm, Payah Bleh li...@ruby-forum.com wrote:
I have this application installed on my computer
apache HTTP Server 2.2
Ruby 1.8.7
Gems
Rails
Mysql 5.1
in appache configuration file i
Kim wrote:
To clarify:
Some of the data for my rails app is stored in a non-rails DB table. I
need to query this other database and then show the data in the rails
app.
I can only tell you what I did when I needed to do this. I did NOT use
find_by
_sql, I actually set up ActiveRecord classes
Jonathan Rochkind wrote:
An AR model for a particular table, as you can see you can even use AR
associations (to other tables within the same db! Trying to make
associations cross-db tends not to work):
http://umlaut.rubyforge.org/svn/trunk/app/models/sfx_db/object.rb
Heh, I also see
Hi,
I also need to validate users via Shibboleth on a Ruby application using
Nginx and Mongrel.
I've searched but not found instructions on how to do this.
Would someone please let me know if they have a resource for
implementation of Shibboleth on a Ruby / Nginx / Mongrel setup?
Thank you!
Hi guys,
I am really new to these things like ROR and Postgres.
When I was installing ROR 3.0 it says
Successfully installed rails 3.0.0 beta
1 gem installed
Installing ri document for rails 3.0.0 beta
File not Found: lib
This is the one which I really dont understand and dont know what to do?
Yeah, thank you very much.
The problem was the version of RubyGems.
Uff, thanks, you (David and Marnen) are my salvation.
Greetings.
El 18 de mayo de 2010 20:35, Iván Hernández Cazorla
ivanhcelrinconelme...@gmail.com escribió:
Thanks David, then I try with this project that you show me.
Is there a way to list on a web page the current controller actions
define din the controller? Would like to put up a link for each
automatically.
--
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
On Wed, May 19, 2010 at 1:26 PM, Siva Kilaru li...@ruby-forum.com wrote:
Hi guys,
I am really new to these things like ROR and Postgres.
When I was installing ROR 3.0 it says
Successfully installed rails 3.0.0 beta
1 gem installed
Installing ri document for rails 3.0.0 beta
File not
On May 19, 2010, at 1:35 PM, Me wrote:
Is there a way to list on a web page the current controller actions
define din the controller? Would like to put up a link for each
automatically.
PagesController.instance_methods(false)
= [destroy, contact, list, show, expire_all, edit,
Cool forgot about the (false). Any way to get the respond_to formats also
On Wed, May 19, 2010 at 15:55, steve ross cwdi...@gmail.com wrote:
On May 19, 2010, at 1:35 PM, Me wrote:
Is there a way to list on a web page the current controller actions
define din the controller? Would like to
Conrad Taylor wrote:
On Wed, May 19, 2010 at 1:26 PM, Siva Kilaru li...@ruby-forum.com
Good luck,
-Conrad
Thanku Conard,
I appreciate it. I want to know about the file not found thing while
installing Rails 3.0 beta.
Can you help me out in this as well??
Good Luck
Siva
--
Posted via
Thanks Jonathan for the example. I had been using an AR model for my
non-rails table. The piece I was missing was setting the table name!
So for others this is what I did
class Whatever AR
self.establish_connection :whatever (non-rails DB defined in .yml)
self.set_table 'name of non-rails
On May 19, 2010, at 2:01 PM, Chris Habgood wrote:
Cool forgot about the (false). Any way to get the respond_to formats also
On Wed, May 19, 2010 at 15:55, steve ross cwdi...@gmail.com wrote:
On May 19, 2010, at 1:35 PM, Me wrote:
Is there a way to list on a web page the current controller
ya we have you know action.format set up, I was trying to auto set up links
for each type.
On Wed, May 19, 2010 at 16:49, steve ross cwdi...@gmail.com wrote:
On May 19, 2010, at 2:01 PM, Chris Habgood wrote:
Cool forgot about the (false). Any way to get the respond_to formats also
On Wed,
A yeah i guess that does make sense.
Now what about...I think well trying to come up with my counter-piece
I answered my own question so let me see if I have it correct:
If the user was created in context of the dealer like you said. Then
in the dealers control panel the user can update
TEKsystems is working with a client to find a Ruby on Rails developer
for a position here in New Orleans. They are looking for an entry level
or mid level Ruby on Rails developer. The client develops applications
for e-commerce websites. This position is full-time and the candidate
must work
I'd have to second Heroku. It would be hard to devise something
simpler.
On May 19, 3:56 am, Trausti Thor Johannsson t...@studlar.net wrote:
dreamhost.com, they are quite cheap and give you a chance to grow up
for very little money. Then you can grow into a vps at their site or
move
If you have an array of objects and you do
array_of_objects.each do |o|
o.method
end
Do the attributes of the object get passed to the method so you can
access them?
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this
Hi
In a partial,
I display group_name , when clicked on groupname the div with id=abc
should appear below my group.
I want to make my div visible false initially at the time of loading my
page and Once click on the groupname I the div should be visible below
the groupname.
I tried with
i need to find records which are starts with numeric values. So how
can i write the sql query?
nirosh
--
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-t...@googlegroups.com.
To unsubscribe
nice. I'll be looking forward to that.
Will it play nice with other login options (the old oauth in
particular, which is still needed for Twitter)?
Cheers,
Andrew
On May 19, 12:10 am, giovanni potoma...@gmail.com wrote:
I'm working on a new version of authlogic_oauth that will use
oauth2...
Sent from my iPhone
On May 19, 2010, at 8:04 PM, Me chabg...@gmail.com wrote:
If you have an array of objects and you do
array_of_objects.each do |o|
o.method
end
Do the attributes of the object get passed to the method so you can
access them?
The object's attributes are available
Hi, ok if you replace Concept with Vehicle (ala tank, car, truck, plane,
etc), Entity with Model (Z30, 911 turbo, F16, etc), Dimension with
SubjectiveDimension (quality, comfort, etc) and Fact with FactualDimension
(price, model_year, max_speed, etc) would it make more sense?
1) Vehicles have
88 matches
Mail list logo