[Rails] nill object error

2010-05-19 Thread Ravi Dtv
def grouplist @currentgroupid=Group.find_by_group_name(params[:group_name]) @currentgroupfriends=GroupFriend.find_all_by_user_id_and_group_id(current_user.id,@currentgroupid) format.html {redirect_to :back} end Please check my controller and help me in solving my problem. I need to get

[Rails] Re: accepts nest attributes & attr_accessible

2010-05-19 Thread Sharagoz
On May 20, 12:14 am, brianp wrote: > If the user updates the profile and it's processed via the dealer then > this would not be an issue because it would still be in context That is correct, however if you set the dealer_id to readonly, then it is not possible for the user to change it anyway, so

Re: [Rails] Re: Activerecord association design advice

2010-05-19 Thread Ali Akhtarzada
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 many

Re: [Rails] array of objects

2010-05-19 Thread Conrad Taylor
Sent from my iPhone On May 19, 2010, at 8:04 PM, Me 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 within the instance met

[Rails] Re: Facebook, authlogic, and OAuth2

2010-05-19 Thread Andrew C.
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 wrote: > I'm working on a new version of authlogic_oauth that will use > oauth2... > I think it's wha

[Rails] sql statement help

2010-05-19 Thread nirosh
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

[Rails] visual effect for the div

2010-05-19 Thread Ravi Dtv
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 fol

[Rails] array of objects

2010-05-19 Thread Me
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 grou

[Rails] Re: Looking for Easy Rails hosting

2010-05-19 Thread Ritchie
I'd have to second Heroku. It would be hard to devise something simpler. On May 19, 3:56 am, Trausti Thor Johannsson 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 elsewhere. > What they

[Rails] Re: Shibboleth

2010-05-19 Thread Marnen Laibow-Koser
Rob Lacey wrote: > Thanks for the response Alex, to be honest I'm getting in a muddle > trying to figure out how this works / fits together, but I'm picking up > bits and pieces here and there. I'll take a look at RESTful > authentication and have a play. Some concepts may be useful, but please do

[Rails] Anyone interested in a Rails opportunity in New Orleans?

2010-05-19 Thread Sidney Bennett
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 on-sit

[Rails] Re: accepts nest attributes & attr_accessible

2010-05-19 Thread brianp
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 there

Re: [Rails] list controller actions

2010-05-19 Thread Chris Habgood
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 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, May 19, 2010 a

Re: [Rails] list controller actions

2010-05-19 Thread steve ross
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 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 >

[Rails] Re: Multiple Databases using an abstract class - help

2010-05-19 Thread Kim
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 table

[Rails] Re: Postgres + Rail 3.0

2010-05-19 Thread Siva Kilaru
Conrad Taylor wrote: > On Wed, May 19, 2010 at 1:26 PM, Siva Kilaru > 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 http://www.ruby-for

Re: [Rails] list controller actions

2010-05-19 Thread Chris Habgood
Cool forgot about the (false). Any way to get the respond_to formats also On Wed, May 19, 2010 at 15:55, steve ross 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 put up a l

Re: [Rails] list controller actions

2010-05-19 Thread steve ross
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", "e

Re: [Rails] Postgres + Rail 3.0

2010-05-19 Thread Conrad Taylor
On Wed, May 19, 2010 at 1:26 PM, Siva Kilaru 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 Found: lib > >

[Rails] list controller actions

2010-05-19 Thread 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 rubyo

Re: [Rails] Re: How I can install Heroku Gem?

2010-05-19 Thread Iván Hernández Cazorla
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. >

[Rails] Postgres + Rail 3.0

2010-05-19 Thread Siva Kilaru
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?

[Rails] Re: Shibboleth

2010-05-19 Thread Joe User
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!

[Rails] Re: Multiple Databases using an abstract class - help

2010-05-19 Thread Jonathan Rochkind
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 re

[Rails] Re: Multiple Databases using an abstract class - help

2010-05-19 Thread Jonathan Rochkind
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 clas

[Rails] Re: Need Help

2010-05-19 Thread chewmanfoo
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 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 made some cha

[Rails] Re: staying RESTful and triggering actions without saving a record.

2010-05-19 Thread frankjmat...@gmail.com
> 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

[Rails] Need Help

2010-05-19 Thread Payah Bleh
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 comman

[Rails] Re: staying RESTful and triggering actions without saving a record.

2010-05-19 Thread Marnen Laibow-Koser
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 argum

[Rails] Agile web Development with Rails section 9.3

2010-05-19 Thread Angel Dinar
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 it

[Rails] render html partial from atom builder

2010-05-19 Thread Jonathan Rochkind
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 p

[Rails] Re: Multiple Databases using an abstract class - help

2010-05-19 Thread Kim
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. Then

[Rails] Re: new controller - how do I access it via other controllers/views?

2010-05-19 Thread Sharagoz
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 it'

[Rails] Re: NoMethodError in User sessionsController#create - Authlogic

2010-05-19 Thread Amit Pandya
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 >

[Rails] Re: new controller - how do I access it via other controllers/views?

2010-05-19 Thread chewmanfoo
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 wrote: > On Wed, May 19, 2010 at 11:07 AM, chewmanfoo wrote: > > Guys, > > > I have created a new controller Worker which has a method >

[Rails] Re: staying RESTful and triggering actions without saving a record.

2010-05-19 Thread frankjmat...@gmail.com
> >> 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 rou

Re: [Rails] Re: Multiple Databases using an abstract class - help

2010-05-19 Thread Rick DeNatale
On Wed, May 19, 2010 at 1:50 PM, Kim 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 separate database.

Re: [Rails] new controller - how do I access it via other controllers/views?

2010-05-19 Thread Conrad Taylor
On Wed, May 19, 2010 at 11:07 AM, chewmanfoo 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 result of show_work

[Rails] partials and locals

2010-05-19 Thread badnaam
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

[Rails] Re: Cannot have both select and radio_button together on the same form

2010-05-19 Thread Sharagoz
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" wrote: > Hello, I'm new to Ruby on Rails. > > I am creating a form for searching purpose: > > <% form_for :src_cond, >       :url => {:action =>'search

[Rails] new controller - how do I access it via other controllers/views?

2010-05-19 Thread chewmanfoo
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 a

[Rails] Undefined method error when loading schema (Win 7)

2010-05-19 Thread Zooey
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 vario

[Rails] Re: Multiple Databases using an abstract class - help

2010-05-19 Thread Kim
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

[Rails] Re: OneLogin releases SAML for Ruby

2010-05-19 Thread Reynard
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 wrote: > None of those will give you SAML identity provider functionality. They > are both SAML service provider interfaces. > > -

[Rails] Re: accepts nest attributes & attr_accessible

2010-05-19 Thread Sharagoz
This is not a problem if you are always creating users in context of dealers and validating that the one doing the creation is allowed to manage the data for the dealer in question. @dealer.users.create(params[:user]) This ensures that the users dealer_id is set to @dealer.id, even if somebody trie

[Rails] Re: Self Creating edit page?

2010-05-19 Thread brianp
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 wrote: > On 19 May 2010 16:44, brianp wrote: > > > Expecting to get rendered: The same form p

[Rails] how to restrict/control access to certain model attributes depending on role

2010-05-19 Thread Corin
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 us

[Rails] Cannot have both select and radio_button together on the same form

2010-05-19 Thread N.Li
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.submi

[Rails] I18N error

2010-05-19 Thread badnaam
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

Re: [Rails] Re: Self Creating edit page?

2010-05-19 Thread Colin Law
On 19 May 2010 16:44, brianp 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 not POST to the :cr

Re: [Rails] Re: When I do a migration, the changes are make in the test db

2010-05-19 Thread Colin Law
On 19 May 2010 16:09, Jorge alejandro Mendoza torres wrote: > daphonz wrote: >> Have you tried using: >> >> rake db:migrate RAILS_ENV=production >> >> -c >> >> On May 18, 12:35�pm, Jorge alejandro Mendoza torres > I already tried the instruction and the migrations were made in the > production da

[Rails] Re: accepts nest attributes & attr_accessible

2010-05-19 Thread brianp
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. An

[Rails] Re: staying RESTful and triggering actions without saving a record.

2010-05-19 Thread Marnen Laibow-Koser
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 t

[Rails] Re: staying RESTful and triggering actions without saving a record.

2010-05-19 Thread frankjmat...@gmail.com
On May 19, 11:29 am, Marnen Laibow-Koser 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 any insight o

[Rails] Re: Self Creating edit page?

2010-05-19 Thread brianp
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 my

[Rails] Re: acts_as_list manual plugin install

2010-05-19 Thread Marnen Laibow-Koser
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 s

[Rails] Re: staying RESTful and triggering actions without saving a record.

2010-05-19 Thread Marnen Laibow-Koser
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 ta

[Rails] Re: When I do a migration, the changes are make in the test db

2010-05-19 Thread Jorge alejandro Mendoza torres
daphonz wrote: > Have you tried using: > > rake db:migrate RAILS_ENV=production > > -c > > On May 18, 12:35�pm, Jorge alejandro Mendoza torres ["id_oficina = ?", clave[i].to_i]) In my table, all records exist. -- Posted via http://www.ruby-forum.com/. -- You received this message because y

[Rails] Re: ActionMailer using wrong layouts on prod box

2010-05-19 Thread Artur Xxx
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

[Rails] Re: staying RESTful and triggering actions without saving a record.

2010-05-19 Thread frankjmat...@gmail.com
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 =>

[Rails] Plugin Architecture

2010-05-19 Thread Joshua Martin
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) --

[Rails] form_tag can't use get method

2010-05-19 Thread d4ny1
Hi there I try to use form_tag form_tag( post_path, :method => :put) to generate 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? Cheers, Danyi -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: T

[Rails] Re: staying RESTful and triggering actions without saving a record.

2010-05-19 Thread Marnen Laibow-Koser
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 di

[Rails] Re: Unit Test newbie problem

2010-05-19 Thread Marnen Laibow-Koser
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 -- P

[Rails] Re: define environment for rake db:seed

2010-05-19 Thread Rob Nichols
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 unsubscrib

[Rails] Re: Re: Table with dynamic content

2010-05-19 Thread Ar Chron
<% @photos.in_groups_of(3, false) do |group| %> <% group.each do |photo| %> <%= photo.filename_or_whatever %> <% end %> <% 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 G

Re: [Rails] Re: Table with dynamic content

2010-05-19 Thread Peter Hickman
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 <% until @photos.empty? -%> <% x = @photos.slice!(0,3) -%> <% x.

[Rails] Re: customized form_for in ApplicationHelper

2010-05-19 Thread tshim
Use a form builder. See the api doc. On May 19, 3:04 am, poseid 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) >   concat("", proc.binding) >

[Rails] Re: define environment for rake db:seed

2010-05-19 Thread tshim
rake db:seed RAILS_ENV=production On May 19, 6:15 am, Rob Nichols 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 > loads the seed da

Re: [Rails] Re: Table with dynamic content

2010-05-19 Thread Michael Pavling
On 19 May 2010 13:59, the batman 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 > was I on t

[Rails] Re: OneLogin releases SAML for Ruby

2010-05-19 Thread ChristianP
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 wrote: > Hi there, thanks for releasing this toolkit. Does "supports both > service provider and identity provider initiated web SSO" means yo

[Rails] q: belongs_to & build

2010-05-19 Thread tom
hi invite location location 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') loc.save! >> c

[Rails] Re: Table with dynamic content

2010-05-19 Thread the batman
> * 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? <% @photos.each do |photo| %> <%

[Rails] Re: ActiveRecord / Nested Attributes create missing associat

2010-05-19 Thread David Bln
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 http://www.

[Rails] [Event] Acts As Conference 2010 - We Want You To Speak!

2010-05-19 Thread Robert Dempsey
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 day

Re: [Rails] Table with dynamic content

2010-05-19 Thread Michael Pavling
On 19 May 2010 13:20, the batman wrote: > I want to create a table displaying  image thumbnails, 3 per row. > Can I use an if loop to create the 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 a number of methods

[Rails] Re: Activerecord association design advice

2010-05-19 Thread Sharagoz
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 eit

[Rails] Table with dynamic content

2010-05-19 Thread the batman
I want to create a table displaying image thumbnails, 3 per row. Can I use an if loop to create the 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. T

[Rails] define environment for rake db:seed

2010-05-19 Thread Rob Nichols
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 produc

[Rails] Re: Unit Test newbie problem

2010-05-19 Thread RichardOnRails
Thanks for your help. My faith the Unit Test *really* works is strengthening :-) On May 18, 12:56 am, frogstarr78 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 your test you are cal

[Rails] Activerecord association design advice

2010-05-19 Thread Ali
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 num_st

[Rails] customized form_for in ApplicationHelper

2010-05-19 Thread poseid
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("", proc.binding) form_for(name, object, (options||{}).merge(:builder => TabularForm

[Rails] customized form_for in ApplicationHelper

2010-05-19 Thread poseid
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("", proc.binding) form_for(name, object, (options||{}).merge(:builder => TabularForm

[Rails] Re: HABTM Blank Join table

2010-05-19 Thread Sharagoz
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 e

[Rails] Re: Self Creating edit page?

2010-05-19 Thread Sharagoz
On May 19, 2:36 am, brianp 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 rendered? -- You rece

Re: [Rails] Re: Rails, Paperclip and SWFupload ...

2010-05-19 Thread Peter De Berdt
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 h

[Rails] Re: validation on association create

2010-05-19 Thread Sharagoz
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]) @dealer.addresses.create!(param

Re: [Rails] ajax on load?

2010-05-19 Thread Peter De Berdt
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 say,

[Rails] Re: Facebook, authlogic, and OAuth2

2010-05-19 Thread giovanni
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 wrote: > Rpx might be good for some people.  It's a single sign-on service

[Rails] observe_field not working on dependeng collection_select

2010-05-19 Thread Ian Navarro
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 Sel

[Rails] Fwd: {MUGH} Visual Studio 2010 Training Course And Video Tutorials - torrent

2010-05-19 Thread Ramesh E
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 Stud

[Rails] Re: accepts nest attributes & attr_accessible

2010-05-19 Thread Sharagoz
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 and