[Rails] Having problems with rails connectivity to postgres (libpq?)

2010-12-17 Thread Tim Uckun
I have some daemons that connect to a PG database and are pretty busy. Every few days at least one of them starts failing with this error. PGError: lost synchronization with server: got message type something Sometimes the message type is an empty string. Other times it's a letter like E or

[Rails] Re: Capybara + radio buttons

2010-12-16 Thread Tim Shaffer
Short answer is the IDs should be unique. -- 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 email to

[Rails] Re: Problem with Command Prompt

2010-12-16 Thread Tim Shaffer
This isn't really related to RoR... BUT, you can simply change drives by typing the drive letter: C:\Documents and Settings\tim h: H:\ -- 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

[Rails] Re: How to relate model with self value?

2010-12-15 Thread Tim Shaffer
You could just use a method instead... class User ActiveRecord::Base has_many :payments def testing_payments payments.where(:testing = testing) end end -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this

Re: [Rails] Re: How to relate model with self value?

2010-12-15 Thread Tim Shaffer
On Wednesday, December 15, 2010 12:50:03 PM UTC-5, rob wrote: On Dec 15, 2010, at 12:04 PM, Colin Law wrote: On 15 December 2010 17:01, Tim Shaffer wrote: You could just use a method instead... class User ActiveRecord::Base has_many :payments def testing_payments payments.where

[Rails] Re: simple average question with mysql

2010-12-15 Thread Tim Shaffer
http://lmgtfy.com/?q=sql+avg+count select avg(url_count) from ( select count(url_id) as url_count, user_id from urls_users group by url_id limit 10 ); -- 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

[Rails] Re: Custom form error messages

2010-12-14 Thread Tim Shaffer
No need to overwrite anything. You can simply access the @resource.errors hash and display the error if there is one... %= f.label(:author) % % if @comment.errors[:author] % %= @comment.errors[:author] = % end % % f.text_field(:author, :size=20, :maxlength=250) % -- You received this

[Rails] Re: Juggernaut command not found

2010-12-13 Thread Tim Shaffer
On Dec 13, 6:51 am, Priya D. li...@ruby-forum.com wrote: Hi, While i'm trying to execute the following command, i'm getting command not found error. juggernaut -g juggernaut.yml (This is used to configure the gem.) I think we might be able to help if you could provide more information about

[Rails] Re: validate_on_update not highlighting fields

2010-12-09 Thread Tim Shaffer
On Dec 9, 1:34 pm, Brian Penrose li...@ruby-forum.com wrote: This successfully throws the validation error if internet access is checked and internet use is left blank, however it does not properly highlight the field that was left blank (in this case internet_use). Any suggestions? When you

[Rails] Re: Caching for layout variables

2010-12-08 Thread Tim Shaffer
On Dec 7, 4:12 pm, Marnen Laibow-Koser li...@ruby-forum.com wrote: Look up the RDoc for ActiveSupport::Cache::Store.  You'll need to use the interface described there (at least in Rails 2). Thanks. Turned out to be way simple... @menu_items = Rails.cache.fetch(:menu_items_all) { MenuItem.all }

[Rails] Re: Caching for layout variables

2010-12-08 Thread Tim Shaffer
On Dec 8, 11:08 am, Frederick Cheung frederick.che...@gmail.com wrote: On Dec 8, 3:39 pm, Tim Shaffer timshaf...@me.com wrote: On Dec 7, 4:12 pm, Marnen Laibow-Koser li...@ruby-forum.com wrote: Look up the RDoc for ActiveSupport::Cache::Store.  You'll need to use the interface described

[Rails] Caching for layout variables

2010-12-07 Thread Tim Shaffer
To make a long question short: I'm fairly new to caching in Rails. What's the best way to cache stuff that is used in the layout without caching the entire action/view? Lets say I have the following in my Application controller to set some variables that are used in my layout: before_filter

[Rails] Re: How to Redirect from http://mysite.com to https://www.mysite.com on Herok

2010-12-03 Thread Tim Shaffer
On Dec 3, 1:54 pm, Phillip omsdialo...@gmail.com wrote: This would typically be done by the server (usually Apache) Agreed, but using Heroku means that it not an option. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this

[Rails] Re: How to Redirect from http://mysite.com to https://www.mysite.com on Herok

2010-12-02 Thread Tim Shaffer
On Dec 1, 4:44 pm, CuriousNewbie bhellm...@gmail.com wrote: Any ideas on how to redirect in a way that avoids the nasty SSL HTTPs invalid warning? I have never used Heroku, but couldn't you just use https://; in the redirect instead of request.protocol? -- You received this message because

[Rails] Re: Redirect to edit form after update

2010-12-01 Thread Tim Shaffer
On Dec 1, 11:12 am, Leonel *.* li...@ruby-forum.com wrote: ALRIGHT!! AWESOME!!! Simple and it works! I did this... flash[:notice] = 'User was successfully updated.' respond_to do |format|   if @user.update_attributes(params[:user])     format.html { redirect_to(:action = 'edit') }    

[Rails] Re: Rails2 to rails3 routes migration problem - namespaces

2010-11-29 Thread Tim Shaffer
On Nov 29, 5:08 am, Adam W. li...@ruby-forum.com wrote: What is the proper way to map such controllers? The Routing guide seems to cover this topic pretty well: http://edgeguides.rubyonrails.org/routing.html#dynamic-segments -- You received this message because you are subscribed to the

[Rails] Re: Why is my models can't be related using has_one and belongs_to?

2010-11-16 Thread Tim Shaffer
On Nov 16, 7:17 am, arga aridarma arga_arida...@yahoo.com wrote: Am I missing something here, like violating a naming convention or something? When you specify the association with has_one or belongs_to, you should be using lowercase_underscore instead of CamelCase. For example: has_one

[Rails] Re: Why is my models can't be related using has_one and belongs_to?

2010-11-16 Thread Tim Shaffer
On Nov 16, 7:17 am, arga aridarma arga_arida...@yahoo.com wrote: I'm getting a feeling that I didn't set the relationship right, because i don't see any attributes addition in the ComUser from the model started with Def-something that i create above.. Forgot to add that changing the case on

[Rails] Re: Sorting with Associations ??

2010-11-16 Thread Tim Shaffer
On Nov 16, 2:27 pm, andyl akl...@gmail.com wrote: Something like this: Member.order(roster.name, zip_code).all But I can't get the syntax quite right - I've played around with join and include - can anyone tell me the right syntax to use?? Remember that table names are plural.

[Rails] Re: ActiveRecord query

2010-11-12 Thread Tim Shaffer
On Nov 12, 6:59 am, Ich aconsuegra2...@gmail.com wrote: I want all the convenios that don't have been requested by a particular user. This is not tested, but I think something like this should get you what you want. May need to tweak it a little bit.

[Rails] Re: Validation Errors

2010-11-12 Thread Tim Shaffer
On Nov 12, 6:15 am, Premanshu Mishra li...@ruby-forum.com wrote: Hi Railers, I have put a simple validation validates_length_of :subject, :maximum = 10, :message = pick a shorter subject If i have more than 10 characters in subject, the message is not being sent; but on the contrary,

[Rails] Re: How to handle concurrently opened windows

2010-11-12 Thread Tim Shaffer
On Nov 12, 10:07 am, Fritz Trapper li...@ruby-forum.com wrote: The simplest case: A paginated index that offers an edit link, that returns to the current page of the index. The page number is stored in session. Store the page parameter in the query string instead of the session. -- You

[Rails] Re: Rails Sever Crash

2010-11-11 Thread Tim Shaffer
On Nov 11, 9:40 am, Hemanth K. li...@ruby-forum.com wrote: Hi, My rails app exposes REST SERVICES, when the server is down for any reason, server upgrade or a unexpected crash. The REST requests coming from the clients should be logged/captured so that we can insert the data after the

[Rails] Re: Rails VALIDATES w :message ?

2010-11-10 Thread Tim Shaffer
On Nov 10, 11:35 am, CuriousNewbie bhellm...@gmail.com wrote: Hello, I have the following:       validates :fname, :presence = true, :length = { :minimum = 2 } How do I add a message to that? Right now the errors says Fname is too short (minimum is 2 characters) I'd like it to say First

[Rails] Re: Displaying a form

2010-11-08 Thread Tim Shaffer
On Nov 7, 1:52 pm, Kellsborojack kellsboroj...@gmail.com wrote: So what I'm trying to do is once the link is clicked, the relevant form is displayed in the .box div rather than on a new page. I think the simplest way would be to just output all the HTML on the page, then just hide or show the

[Rails] Re: belongs_to :through

2010-11-05 Thread Tim Shaffer
On Nov 5, 1:13 pm, TomRossi7 t...@themolehill.com wrote: Why is belongs_to :through not an option with Rails?  I'm sure there is something I'm missing!  I find myself wanting it more now with lazy loading in Rails 3. project belongs_to client task belongs_to project task belongs_to client

[Rails] Re: Assign value in ruby in html.erb file?

2010-11-05 Thread Tim Shaffer
On Nov 5, 3:25 pm, kishoj kis...@gmail.com wrote: Thank you all for your warm response!!! I got the solution. Its something like below % form_for [...@request, Comment.new] do |f| %           p             %= f.hidden_field :request_id, :value = @request.id %          

[Rails] Re: Getting postgres connection errors

2010-11-03 Thread Tim Uckun
This problem started with the recent update to rails. I also think it may have to do with this statement ActiveRecord::Base.connection_pool.clear_stale_cached_connections! The postgres mailing list tells me these errors have to do with threading in libpq. On Wed, Nov 3, 2010 at 11:41 AM, Tim

[Rails] Getting postgres connection errors

2010-11-02 Thread Tim Uckun
I am getting these types of errors quite frequently and am wondering what may be causing them or how to fix them. PGError: lost synchronization with server: got message type T, length 1409286191 PGError: lost synchronization with server: got message type T, length 1409286191 PGError: lost

[Rails] Re: has_one :item, :polymorphic = true

2010-11-01 Thread Tim Shaffer
Is this a one-to-one, or one-to-many relationship? Which class should has the foreign key? Do your A, B, and C classes have a foreign key to person, or do you want person to have a foreign key to one of the other 3 models? -- You received this message because you are subscribed to the Google

[Rails] Re: has_one :item, :polymorphic = true

2010-11-01 Thread Tim Shaffer
Yup, then like Marnen said, Person should belong to Item: belongs_to :item, :polymorphic = true In your migration, you can use: t.references :item, :polymorphic = true Which will create item_type and item_id columns. Then each class A, B, and C can have one person: has_one :person, :as

[Rails] Re: has_one :item, :polymorphic = true

2010-11-01 Thread Tim Shaffer
On Nov 1, 2:18 pm, dpal dan...@gmail.com wrote: Unfortunatelly has_one polymorphic is not supported, therefore we need to think in reverse. That's because if the belongs_to is on the company models, it's no longer a polymorphic relationship. At that point it's just a regular one-to-one

[Rails] Re: Creating RESTful helpers on the fly

2010-11-01 Thread Tim Shaffer
On Nov 1, 4:40 pm, Pito Salas li...@ruby-forum.com wrote: I would like to be able to create a call to one of these on the fly when I only find out the name of the resource at run time. For example I would like to do this: resource_name = assets resource_path(resource_name, method = :new)

[Rails] Re: rails version check for gems

2010-10-27 Thread Tim Shaffer
On Oct 27, 9:09 am, Tony Primerano tony.primer...@gmail.com wrote: Seems like that would break something once Rails 4 comes out.  ;-) Couldn't you do this? if Rails::VERSION::STRING.to_i = 3 puts at least rails 3 else puts rails 2 or lower end -- You received this message because you are

[Rails] Re: Order by title but then put Other at the end?

2010-10-27 Thread Tim Shaffer
I solved this in an application by creating a separate sort_name field that was strictly used for sorting. Never seen or used by the user at all. We had a before_save :build_sort_name method that handled all sorts of cases. Wouldn't be too hard to add something similar for your scenario. def

[Rails] Passing a form object to a partial within a fields_for using observe_field

2010-10-23 Thread Tim
I'm a Rails newbie, so please bear with me. I'm using version 3.0.0. I have a form to create and update articles which uses a fields_for to nest a 'collaborator' resource, of which an article :has_many. I would like for users to be able to search for other users to add as collaborators

[Rails] Re: print page and Link_to problem

2010-10-20 Thread Tim Shaffer
I can't begin to tell you how insulted I am and Your little link taught me nothing... My apologies. I was not intending to be derogatory. Supplying controller and action to the link_to method is one of the most fundamental things you can do in Rails. Instead of just giving you the answer

[Rails] Re: print page and Link_to problem

2010-10-19 Thread Tim Shaffer
So do need to define a path in the routes  or map a route...??? Yes. You would need to define a print_label_tire route. The other option is to specify the controller and action in the link_to call. -- You received this message because you are subscribed to the Google Groups Ruby on Rails:

[Rails] Re: print page and Link_to problem

2010-10-19 Thread Tim Shaffer
This is a teach a man to fish kind of reply... http://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#method-i-link_to -- 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

[Rails] Re: How to create a like button

2010-10-18 Thread Tim Shaffer
Assuming you have the following models: User, Video, Like. If a Like instance belongs to a video and a user. You could use nested routes in the following format: resources :video do resource :like end Which gives you the following URLS: /videos/1/like /videos/1/like/1 So then using the

[Rails] Re: wrong link_to html output

2010-10-18 Thread Tim Shaffer
Is there anything wrong with the link_to syntax/line? Yes. The link_to method has the following signatures: link_to(body, url_options = {}, html_options = {}) link_to(body, url, html_options = {}) When you specify it like you have, Ruby thinks both :action and :remote are part of the

[Rails] Re: Beautiful and meaningful urls

2010-10-15 Thread Tim Shaffer
The to_param method on your model is what gets called to generate the ID for the URL. So a simple solution is to just change that. Lets say your Category model has a unique slug field. You could change it to this: class Category def to_param self.slug end end Then instead of finding by

[Rails] Re: attr_accessor

2010-09-22 Thread Tim Shaffer
On Sep 22, 8:37 am, Abder-Rahman Ali li...@ruby-forum.com wrote: I'm looking at an example here:http://stackoverflow.com/questions/1330273/how-to-calculate-differenc... And, came along this line in MyModel: attr_accessor :start_amount, :end_amount What is attr_accessor? This isn't a

[Rails] Re: problem with the detail-method

2010-09-22 Thread Tim Shaffer
On Sep 22, 4:05 am, Sven Wildermann sven_wilderm...@yahoo.de wrote: Hey, i am very new with handling Ruby on Rails, so i did the Video-Tutorial of video2brain. They use an older Version of Rails (1.8.. - i guess) and in an controller-file they want me to do the following: class

[Rails] Re: Packaging for Rails applications

2010-09-21 Thread Tim Shaffer
On Sep 21, 9:31 am, Amiruddin Nagri amir.na...@gmail.com wrote: I am working on a Rails app, for deployment I usually checkout the code from git repository to the production servers which are running apache with mod-rails. But checking out the complete code, I am also checking out the spec

[Rails] Re: create_table :products do |t|

2010-09-21 Thread Tim Shaffer
On Sep 21, 10:38 am, Abder-Rahman Ali li...@ruby-forum.com wrote: At the following:http://guides.rubyonrails.org/migrations.html You can find: def self.up create_table :products do |t| t.string :name t.text :description t.timestamps end Regarding this line: create_table :products do

[Rails] Re: Ajax CSRF in Rails3

2010-09-21 Thread Tim Shaffer
On Sep 21, 12:23 pm, radhames brito rbri...@gmail.com wrote: doesnt $.getScript passes from data from one domain to another? I doubt it. It probably uses XMLHttpRequest -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this

[Rails] Re: Ajax CSRF in Rails3

2010-09-21 Thread Tim Shaffer
On Sep 21, 2:30 pm, radhames brito rbri...@gmail.com wrote: just comfirmed an getscript does cross-domain calls some guys are using it to send https data over http http://www.viget.com/extend/secure-ajax-from-non-secure-pages/ Actually, that page specifically says that it doesn't work cross

[Rails] Re: Does Rails 3 provide time based caching?

2010-08-26 Thread Tim Shaffer
On Aug 26, 6:33 am, lexer lexer@gmail.com wrote: Hi guys, I need a timebased caching of certain pages. Cache for certain page should be cleared each 15 minutes. Is that possible? Inhttp://edgeguides.rubyonrails.org/caching_with_rails.htmlmanual I see that there is only manual cache

[Rails] Re: display records for today's date

2010-08-25 Thread Tim Shaffer
On Aug 25, 3:35 pm, Bob rpell...@gmail.com wrote: Apologies if this should be separated into a separate thread but this reminded me of a question I had when writing some search methods recently. What, if any, are the differences between the following two find statements? On Aug 20, 2:33

[Rails] Re: Strange problem with each

2010-08-25 Thread Tim Shaffer
On Aug 25, 9:09 pm, Patrick L. li...@ruby-forum.com wrote: Hello all, This is my first time setting up associations in Rails. A User :has_many Jobs, and a Job :belongs_to a User. Take a peak at this code and tell me what you think. For some reason, when I pull these jobs and try to iterate

Re: [Rails] Re: Sharing sessions between a rails3 app and a rails2 app. Rails 2 app crashes.

2010-08-24 Thread Tim Uckun
Well it looks like the core issue is that HashWithIndifferentAccess became ActiveSupport::HashWithIndifferentAccess in rails 3. The session is a serialized ruby object which somewhere is saying that it contains an instance of class ActiveSupport::HashWithIndifferentAccess and rails 2 is

[Rails] Re: Trying to find Rails' parameter parsing code

2010-08-24 Thread Tim Shaffer
I believe it's actually part of Rack. Check out the Rack::Request class, and I think you will find what you're looking for. Specifically starting at line 165 http://github.com/chneukirchen/rack/blob/master/lib/rack/request.rb#L165 -- You received this message because you are subscribed to the

[Rails] Re: Trying to find Rails' parameter parsing code

2010-08-24 Thread Tim Shaffer
Oh, and also there is code in ActionController to pull the params out of the request object and into the controller, which is why you can do params[:value] in the controller. http://github.com/rails/rails/blob/master/actionpack/lib/action_controller/metal.rb#L87 On Aug 24, 3:29 pm, Tim Shaffer

[Rails] Re: Trying to find Rails' parameter parsing code

2010-08-24 Thread Tim Shaffer
I think that's in Rack Utilities http://github.com/chneukirchen/rack/blob/master/lib/rack/utils.rb#L57 On Aug 24, 3:57 pm, Adam Lassek a...@doubleprime.net wrote: I'm trying to understand how the forms microformat is parsed into a nested Hash. On Aug 24, 2:30 pm, Marnen Laibow-Koser

Re: [Rails] Re: Sharing sessions between a rails3 app and a rails2 app. Rails 2 app crashes.

2010-08-24 Thread Tim Uckun
I'll give that a try and see if it works. Another thing I noticed was that rails3 sets a 'session_id' and rails2 sets a :session_id Just to follow up on this... Your workaround worked but it only went so far. Now I am getting this error. Session contains objects whose class definition

Re: [Rails] Re: Sharing sessions between a rails3 app and a rails2 app. Rails 2 app crashes.

2010-08-23 Thread Tim Uckun
= '_session_identifier', :domain = .domain.name Rails.application.config.secret_token = secret Rails.application.config.cookie_secret = secret in the rails3 app I set the variables like this session['tim'] = 'This is a session variable' cookies['tim'] = 'This is a cookie variable

[Rails] Sharing sessions between a rails3 app and a rails2 app. Rails 2 app crashes.

2010-08-22 Thread Tim Uckun
Hey all. I have two apps. One is a rails3 app and the other is a rails 2 app. Using proxying I am routing actions in the myapp.com/foo to the rails2 app. It almost works! I can set a session variable and a cookie variable on the first app (myapp.com) and then read them on the second app

[Rails] Re: CSV with fastercsv

2010-08-20 Thread Tim Shaffer
This isn't a Rails question. But, can't you just put the double quotes insides single quotes? csv [45678, 45678, 'stringa'] -- 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

[Rails] Re: undefined method `eq' for nil:NilClass

2010-08-18 Thread Tim Shaffer
What does your view look like? -- 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 email to

[Rails] Re: How to use local javascript library for development and externally hosted for production?

2010-08-17 Thread Tim Shaffer
Another option is to create your own configuration file and use the URL to the JavaScript file as a configuration variable. See here: http://railscasts.com/episodes/85-yaml-configuration-file -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] Re: Embedded Ruby

2010-08-16 Thread Tim Shaffer
No. Embedding Ruby in a .html.erb file in just tells Rails to use the ERB templating library. It's still processed by the standard Ruby interpreter. See the docs for more info: http://ruby-doc.org/stdlib/libdoc/erb/rdoc/classes/ERB.html -- You received this message because you are subscribed

[Rails] Hash.from_xml does not handle attributes as of rails3 beta4

2010-08-11 Thread Tim Uckun
Can anybody confirm whether or not this has been fixed in the rc releases? -- 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 email

[Rails] Re: Get integers for all months between two dates

2010-08-10 Thread Tim Booher
Colin, Good point, but I am not sure of another way. I need to display calendars that show all events in a group. I'll look at the bigger picture again. Best, tim Colin Law wrote: On 9 August 2010 18:52, Tim Booher li...@ruby-forum.com wrote: � � �m [date.month, date.year] � � �d

Re: [Rails] Re: Updating a collection in a RESTful m anner…

2010-08-10 Thread Tim Harding
...@gmail.com wrote: Here is an advise for What is the Restful manner for updating a collection? http://rails-bestpractices.com/questions/3-what-is-the-restful-manner-for-updating-a-collection On 8月9日, 下午5时52分, Chris Mear chrism...@gmail.com wrote: On 7 August 2010 22:07, Tim Harding tim.hard

[Rails] Get integers for all months between two dates

2010-08-09 Thread Tim Booher
while d = ed.beginning_of_month m [date.month, date.year] d = d.next_month end return m end Thanks, Tim -- 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

[Rails] Updating a collection in a RESTful manner…

2010-08-08 Thread Tim Harding
to my controller? Thanks very much, -Tim -- 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 email to rubyonrails-talk+unsubscr

[Rails] Re: setting the size of a textarea

2010-08-02 Thread Tim Shaffer
It's possible you have a style that is overwriting the rows and cols attribute. -- 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] curl works when testing JSON response but the functional and integration tests do not work.

2010-08-02 Thread Tim Uckun
I am trying to test an action which is supposed to give a json response The url goes something line /blah/model.json When I POST to that URL using curl like this curl -H Content-Type:application/json -H Accept:appn/json-d data http://localhost:3000/blah/model.json it works just fine. In

[Rails] How to determine the running controller in rails3

2010-07-28 Thread Tim Uckun
The @controller and @template are returning nil in rails3. What is the proper way to refer to the current controller in rails3? Cheers. -- 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

[Rails] Q: Rails 3 Multiselect input param

2010-06-24 Thread Tim Washington
input type=submit value=Search / /form fig. 1 Parametersapplication/x-www-form-urlencoded content_provider FLR content_provider SLDT fig. 2 PARAMs[{content_provider=SLDT, controller=html_items, action=search}] ... fig. 3 Thanks Tim -- Posted via http://www.ruby-forum.com

[Rails] Re: Dropdown onchange event?

2010-06-11 Thread Tim Shaffer
this.getAttribute(value) won't work on a select input, since the select doesn't have a value attribute. Rather, it has a list of options, and one or more of them are selected. Try this.selectedIndex.value instead. -- You received this message because you are subscribed to the Google Groups Ruby

[Rails] Re: Dropdown onchange event?

2010-06-11 Thread Tim Shaffer
Please post the HTML that is output from the form. -- 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 email to

[Rails] Re: Rails crashes when running more than 1 instance..

2010-06-10 Thread Tim Baas
Marnen Laibow-Koser wrote: Tim Baas wrote: Thank you all for the fast responds.. I can see now that the problem is I need to run the different applications on different ports.. The only thing is, I've heard it has to be possible to run more applications on one port, I want to use port 80

[Rails] Re: Rails crashes when running more than 1 instance..

2010-06-09 Thread Tim Baas
the problem be because of DirectAdmin? Does anyone has experience with R.E.E. in combination with CentOS and DirectAdmin? Many thanks for the help so far, I hope we can figure this out, it's really anoying, because I have to get the second application up and running.. Tim -- Posted via http

Re: [Rails] Automatically decrement value each day

2010-05-30 Thread Tim Lovett
Id suggest using a database job but you could always just store when you last decreased it date and then on sign in do the decrease. If you plan on showing other users the points you'd need the job. On May 30, 2010 12:37 PM, Becky Russoniello li...@ruby-forum.com wrote: I have a Person model

[Rails] Re: Saving Restful routes path in database

2010-05-18 Thread Tim Shaffer
Should be possible. When you call bar_path(1) it just returns a string like /bar/1 which you can then save in the database. Can you clarify what it doesn't work means when you try this: %= link_to 'bar', bar.path %. Do you get an error? Does it just not output what you expect? That should work

[Rails] Re: Design question

2010-05-18 Thread Tim Shaffer
I think I would just stick with putting those columns on each table. Is there a specific problem you're trying to solve by abstracting them out to a separate table? Unless you're trying to remediate a specific issue, this seems like a solution in search of a problem. What would be the

Re: [Rails] Design question

2010-05-18 Thread Tim Lovett
you combine all three tables unless there is a clear distinction between customers and users, Tim On Tue, May 18, 2010 at 8:58 AM, pepe p...@betterrpg.com wrote: I'm working on application where several tables (users,customers,other...) will have the same name structure (prefix, first, middle

[Rails] Re: XML or YML?

2010-05-18 Thread Tim Shaffer
The problem is, when you want to go back and alphabetize the categories list, for example, you get the record id's changing, and then an object with a category_id of 12 is now pointing to a different category than it was before (since you reordered the table), which forces you to create

Re: [Rails] getting the correct index in a ruby array in a javascript lo

2010-05-16 Thread Tim Lovett
or if there is something wrong with my syntax -- I'm beginning ruby and rails myself so I think that's the correct syntax. Tim On Sat, May 15, 2010 at 9:16 PM, Brandon Fratello li...@ruby-forum.comwrote: So I'm very new to both ruby and javascript, but the basic problem is. I have a ruby array

[Rails] Re: database relation's tying to pull data from another table

2010-04-29 Thread Tim Shaffer
You need to add another loop for the cards: % @collections.each do |collection| % % collection.cards.each do |card| % li%= card.title %/li -- 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

[Rails] Re: Dynamic Meta data

2010-04-27 Thread Tim Shaffer
This is a simple many-to-many relationship. See here: http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html -- 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

[Rails] link_to with resource routes in helper file?

2010-04-23 Thread Tim
Hey all! Any pointers on doing something like: link_to Comments, comments_path from within a helper file just like you can do from a view? Thanks in advance! -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send

[Rails] Re: link_to with resource routes in helper file?

2010-04-23 Thread Tim
sorry under rspec that is with rails 2.3.5 On Apr 23, 3:26 pm, Tim mcintyre@gmail.com wrote: Hey all! Any pointers on doing something like:   link_to Comments, comments_path from within a helper file just like you can do from a view? Thanks in advance! -- You received

[Rails] Re: link_to with resource routes in helper file?

2010-04-23 Thread Tim
sorry, my bad started working on a new app and it was including some bad juju:) On Apr 23, 4:04 pm, Tim mcintyre@gmail.com wrote: sorry under rspec that is with rails 2.3.5 On Apr 23, 3:26 pm, Tim mcintyre@gmail.com wrote: Hey all! Any pointers on doing something like

[Rails] Re: api.rubyonrails.org / guides.rubyonrails.org

2010-04-20 Thread Tim
what problem is that? On Apr 20, 11:37 am, Philip Hallstrom phi...@pjkh.com wrote: It's everyone.  Same problem with the domain registrar as last year. On Apr 20, 2010, at 11:20 AM, Alan Gutierrez wrote: Is it just me, or is everyone seeing backpack girl athttp://api.rubyonrails.org/

[Rails] Introducing Migrator

2010-04-19 Thread tim
. It supports name completion and running migrations for multiple environments. http://github.com/tf/migrator Cheers, Tim -- 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

Re: [Rails] hi - a favour required immediately

2010-04-09 Thread Tim Uckun
On Sat, Apr 10, 2010 at 4:48 AM, Julian Leviston jul...@coretech.net.au wrote: http://code.google.com/webtoolkit/ It would be kind of cool if there was a version of this for ruby or jruby. Just as an alternative to rails. -- You received this message because you are subscribed to the Google

[Rails] Re: How to access multiple models in a single controller

2010-03-10 Thread Tim Shaffer
You should be able to access your Company model from any controller. On Mar 10, 2:33 pm, richardsugg richards...@gmail.com wrote: I am creating a customer database.  The navigation menu will have sections for supported customers, trial customers, unsupported customers, etc.  The nav menu will

[Rails] High CPU load upon upgrade to 2.3.5

2010-03-01 Thread Tim W
After recently updating a rather large app from 2.0.2 to 2.3.5 (running on ruby 1.8.6, latest apache and passenger) the CPU used by the ruby process would jump to 100% for a good 3 secs and locked up the server within minutes. I was able to roll back the changes easily enough, but I am now pulling

[Rails] Re: how to sort on an object contained in a has_many association?

2009-11-16 Thread Tim Harding
Hi, give this a try. Not sure it will work, haven't tested it at all, but it might. class User has_many :update_requests has_many :contacts, :through = :update_requests, :order = 'last_name' end -Tim On Tue, Nov 17, 2009 at 5:14 PM, lunaclaire szager...@gmail.com wrote: Yes, in a browser

[Rails] Trading Google Wave invites for host!

2009-11-11 Thread Tim Mcd
Trading up to 10 google wave invites for a fast, powerful Rails host that provides me with a top level domain: ie: webwebwebwebweb.com or w.com Or similar offers. Send me an email or post here. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~

[Rails] Re: Trading Google Wave invites for host!

2009-11-11 Thread Tim Mcd
Aldric Giacomoni wrote: Tim Mcd wrote: Trading up to 10 google wave invites for a fast, powerful Rails host [...] Not a bad idea, but I don't think the market value is that high. I could be wrong, of course. I'm hoping it is. xD -- Posted via http://www.ruby-forum.com

[Rails] PHP/Rails cooperative sessions thought. (read: am I full of shit, or could this work?)

2009-11-09 Thread Tim Lowrimore
. Is this total lunacy? Could this work? Is there a better way to do this (i.e. a bit of Rails magic?) WTF?! Best Regards, Tim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post

[Rails] Re: PHP/Rails cooperative sessions thought. (read: am I full of shit, or could this work?)

2009-11-09 Thread Tim Lowrimore
Leonardo: Thanks for the swift reply. I'm happy to hear this is working for you! Cheers, Tim On Nov 9, 4:25 pm, Leonardo Mateo leonardoma...@gmail.com wrote: On Mon, Nov 9, 2009 at 7:06 PM, Tim Lowrimore tlowrim...@gmail.com wrote: Scenario:  An application X, is a PHP app that's been

[Rails] Suggestions for tutorial

2009-10-27 Thread Tim
Is there a decent online/web tutorial somewhere on Ruby on Rails? --~--~-~--~~~---~--~~ 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

[Rails] rake gems:build when deploying code that requires native gems

2009-10-20 Thread Tim Harding
) deployment? Is there a way to avoid that? Thanks, -Tim --~--~-~--~~~---~--~~ 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

[Rails] Re: rake gems:build when deploying code that requires native gems

2009-10-20 Thread Tim Harding
Thanks Jacob, can you explain what's going on with the BUILD_GEMS environment variable? Is that set somewhere already or is that there so I can call: BUILD_GEMS=0 cap deploy to avoid building the gems? -Tim On Tue, Oct 20, 2009 at 10:48 PM, Jacob Helwig ja...@technosorcery.netwrote: On Tue

[Rails] Re: A simple editable grid for Rails

2009-10-16 Thread tim
assignment functionality of form_for. This might not lead to a plug-in solution but might be the simplest approach. Best Tim On 16 Okt., 08:27, Brijesh Shah rails-mailing-l...@andreas-s.net wrote: Hi Why you r not try to use Extjs components... take a look athttp://www.extjs.com/products/extjs

<    1   2   3   4   5   6   >