[Rails] ActionController::RoutingError after using scaffold

2010-04-22 Thread William Lang
Hey there, I'm new to Ruby and was following a tutorial found here: http://stackoverflow.com/questions/545951/ruby-on-rails-link-to-syntax Anyway, I already had my own MySQL database from PHP development so I decided to try to create a scaffold off of a table 'users'. I get the following

[Rails] Re: RAILS not SCALABLE?

2010-04-22 Thread Robert Walker
David Zhu wrote: Heyyy First off, I love rails. Even thuogh I'm not as good as some of you guys here, but hey, I started couple months ago, and I am still on my way learning more. But I know there are downsides to Rails too. One of them is scalability. What on earth does that mean?

[Rails] Re: Parameters passing of select_tag

2010-04-22 Thread Prashant
Thanks, I had to place everything in form_tag and everything else worked fine. Now I have all values in Parameters list On Apr 22, 10:32 am, soldier 8863...@gmail.com wrote: how about the rails api doc ? 2010/4/22 Prashant prashant.thak...@gmail.com: I wish to have an option in my

Re: [Rails] RAILS not SCALABLE?

2010-04-22 Thread seth b
On Wed, Apr 21, 2010 at 3:59 PM, David Zhu dzwestwindso...@gmail.com wrote: Heyyy First off, I love rails. Even thuogh I'm not as good as some of you guys here, but hey, I started couple months ago, and I am still on my way learning more. But I know there are downsides to Rails too.

[Rails] Re: ActionController::RoutingError after using scaffold

2010-04-22 Thread Sharagoz
My guess is that you havent specified what the primary_key of the users table is. Rails expect it do be id if you dont specify it. Try adding set_primary_key(:user_id) to your user model if you havent already. On Apr 22, 8:38 am, William Lang li...@ruby-forum.com wrote: Hey there, I'm new to

[Rails] Re: Calling destroy on a model that has no id column

2010-04-22 Thread Sharagoz
If you want Rails to support composite primary keys you need to install a gem. Here's the projects github page: http://github.com/drnic/composite_primary_keys On Apr 22, 7:27 am, soldier 8863...@gmail.com wrote:      # File rails-2.3.2/activerecord/lib/active_record/base.rb, line 2576 2576:    

Re: [Rails] RAILS not SCALABLE?

2010-04-22 Thread Michael Pavling
On 21 April 2010 23:59, David Zhu dzwestwindso...@gmail.com wrote: But I know there are downsides to Rails too. One of them is scalability. What on earth does that mean? You don't *know* that a downside of Rails is its scalability if you don't know what scalability means. You may well have

[Rails] Re: RAILS not SCALABLE?

2010-04-22 Thread Sharagoz
I havent had the luxury of having scaling issues myself yet, but I if an application has trouble handling high volumes of traffic, then the framework is only one of several possible causes for these issues. A more likely cause for the issues are the programmers and not the framework. If you are

[Rails] How to add observer to namespace model?

2010-04-22 Thread Ankit Varshney
I have a namespace as admin and in this i have class as Admin::Business. I want to add observer to it. I tried to add a class Admin::BusinessObserver and adding the observer in environment.rb like config.active_record.observers = [Admin::BusinessObserver]. but it does not work. Can anybody guide

[Rails] Re: ActionController::RoutingError after using scaffold

2010-04-22 Thread William Lang
Sharagoz wrote: My guess is that you havent specified what the primary_key of the users table is. Rails expect it do be id if you dont specify it. Try adding set_primary_key(:user_id) to your user model if you havent already. That fixed it! Thanks so much! -- Posted via

[Rails] [JOBS] Ruby on Rails Developer @ SideReel.com

2010-04-22 Thread Rob Morgan
Hi there, We're looking to add an experienced Ruby/Rails developer to our team here at SideReel in San Francisco. SideReel.com is a fast-growing web site with millions of users that aims to be the center of the online TV world. We are a small established start-up located on the top floor of an

[Rails] Rails 3 associations extra attributes with lazy loading

2010-04-22 Thread Will Prater
Hello, How can one get the extra attributes from the association table while using lazy loading like so: # I have a HMT (rails3) association and am using the includes method to prepare my queries. But Im not able to get at the extra fields in the association table this way. # Schema

[Rails] Server error

2010-04-22 Thread Tom
Hi, I'm new to rails. I installed it according to getting started, created new application, run the server... and got an error :( C:\Temp\RailsApplication1ruby script/server = Booting WEBrick = Rails 2.3.5 application starting on http://0.0.0.0:3000

[Rails] Advice on memcached caching

2010-04-22 Thread fredd
Hi! I need to cache an overview page that lists the latest events (messages, documents, etc). By the side of each event I show the user who created it (including the user's avatar). I have tried to use a cache this with the cache_key of the page that holds the contents. In the belongs_to method of

[Rails] Re: problem with partial rendering for groups of objects

2010-04-22 Thread Adler Santos
On Apr 22, 1:25 am, Ar Chron li...@ruby-forum.com wrote: Somewhere you need to keep track of which iteration of Next you are on in the view - perhaps a hidden field would suffice. A processing heavy version would use in_groups_of in the controller to let you walk the groups and just return

Re: [Rails] Re: RAILS not SCALABLE?

2010-04-22 Thread Trausti Thor Johannsson
Scaling problems is what happens when you all of the sudden need to figure out where to put your 5.000 servers all running 2xQuad core cpus and have 128 GB memory. Facebook has 50.000 cache servers, thats ONLY for cache. If your site can run on a handful of servers, you don't really have a

[Rails] Re: Rails 3 + Rspec 2 + Remarkable

2010-04-22 Thread Christopher Dell
Ho-Sheng Hsiao wrote: Hi guys, I'm working on getting Remarkable working with Rails 3 / Rspec 2. I don't know how many users care about it, but I figured I'd give users a chance to tell me. The way it looks now, it won't be backwards compatible (primarily because Rspec2 has a lot of

[Rails] Re: Server error

2010-04-22 Thread Anubhaw Prakash
Install the jruby-openssl gem and then try. -- 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,

Re: [Rails] Re: Server error

2010-04-22 Thread Tomasz Czekala
I tryed, it didn't help. I uninstalled Ruby and instaled older version - 1.8.7, and there it works :) Of course now I've got other problems, but mabey it's Rubys 1.9.1 bug, or something -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To

[Rails] upload file and display thumbnail immediately on form

2010-04-22 Thread ES
Does anyone know how to upload a photo and display the thumbnail in the form before submitting with Paperclip? -- 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

Re: [Rails] How to create Voronoi diagrams

2010-04-22 Thread Gregory Seidman
On Thu, Apr 22, 2010 at 05:53:25AM +0200, Jorge Sosa suazo wrote: Anyone know how to generate Voronoi diagrams with rubyvor library? .. It would be helpful .. I don't know anything about rubyvor, but I wrote the Ruby port of this some time ago:

[Rails] Re: Caching of data on server?

2010-04-22 Thread Pieter Hugo
Hi Sijo Thanks for the info - I will look in to the @@ idea In any case the data needs to be visible 'between' sessions as well. But this needs the data to be stored in D B it self. Is it? Yes - The data is currently in a table in the database - it is a table of rights users have under

[Rails] Passing variables

2010-04-22 Thread Hemant Bhargava
Hello all, I am trying to pass variables in Ajax.Request method. I can see that we can pass a single variable as:- new Ajax.Request('/controller/action?id= + value + status=JOINING', {asynchronous:true, evalScripts:true, parameters:'resume[comment]=' + $F('resume_comment + forward_value + ')});

[Rails] Re: api.rubyonrails.org site is taken over by a domain squatter

2010-04-22 Thread tonypm
Thanks - it may have only been a short time, but I was missing the guides. -- 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] Forcing partial type to rxml but Rails still looks for erb

2010-04-22 Thread Fernando Perez
Hi, I am using rxml to render the response of a request and I'd like to use rxml partials to dry things out. The problem is that in the parent rxml view, Rails expects the partial to be an erb file which is incorrect. Trying the following did not work either as it still looked for an erb file

[Rails] Re: Forcing partial type to rxml but Rails still looks for erb

2010-04-22 Thread Fernando Perez
Ok, I found out that that rxml is deprecated and I should use builder extension instead so that solved part of the equation. Now I'm having another problem with collection. The following does not work and in the partial I get @articles instead of a local var article. xml render(:partial =

[Rails] Re: problem with partial rendering for groups of objects

2010-04-22 Thread Ar Chron
Adler Santos wrote: Is there a line of code I'm missing that will allow the execution of the next method and will overwrite the initial @remaining that was produced by the index method? Thanks. I assume that @remaining from your controller methods is squirreled away in a hidden field on your

[Rails] Re: Re: api.rubyonrails.org site is taken over by a domain squatter

2010-04-22 Thread Fernando Perez
What a pointless remark. 37signals paid the renewal of the domain well beforehand, their registrar screwed up again. That's hardly their fault and has nothing to do with 37signal's infrastructure. It's 37signals' fault as it already happened in the past and they did not take action to prevent

[Rails] Re: Re: api.rubyonrails.org site is taken over by a domain

2010-04-22 Thread Marnen Laibow-Koser
Fernando Perez wrote: What a pointless remark. 37signals paid the renewal of the domain well beforehand, their registrar screwed up again. That's hardly their fault and has nothing to do with 37signal's infrastructure. It's 37signals' fault as it already happened in the past and they did not

Re: [Rails] Re: Caching of data on server?

2010-04-22 Thread Colin Law
On 22 April 2010 11:58, Pieter Hugo li...@ruby-forum.com wrote: Hi Sijo Thanks for the info - I will look in to the @@ idea In any case the data needs to be visible 'between' sessions as well.    But this needs the data to be stored in D B it self. Is it? Yes - The data is currently in a

[Rails] Re: Re: Best practice around putting rails database info int

2010-04-22 Thread Marnen Laibow-Koser
Rob Biedenharn wrote: [...] Matt, Pito, Marnen, and anyone else, 1. The opinion on whether db/schema.rb goes into the source repository has changed over time. No. I've used Rails since 1.2.6. Every version has put a comment in the schema.rb file that recommends putting it into version

Re: [Rails] upload file and display thumbnail immediately on form

2010-04-22 Thread Peter De Berdt
On 22 Apr 2010, at 11:56, ES wrote: Does anyone know how to upload a photo and display the thumbnail in the form before submitting with Paperclip? Clientside resizing is available in SWFUpload. Have fun (you'll have to write the javascript yourself though)!

Re: [Rails] Re: why is ActiveRecord tying to select nonex ID column?

2010-04-22 Thread Rick DeNatale
On Tue, Apr 20, 2010 at 12:51 PM, Fearless Fool li...@ruby-forum.com wrote: Frederick Cheung wrote: for a normal HABTM there is no corresponding model, so rows never get updated by this code path. The habtm association generates sql fragments directly and runs them Furthermore, because habtm

[Rails] Re: Calling destroy on a model that has no id column

2010-04-22 Thread pepe
If this is not a legacy table I would recommend adding the ID column and make it your primary key. It will simplify things. You could still have a unique key on article and user that you can use to your hearts content. If that's the way you are going I would add an index on those 2 columns since

[Rails] Re: HOW TO Track How Many Recipients Open Your Mail IN RAILS?

2010-04-22 Thread pepe
I could be wrong but I don't think you'll be able to accomplish what you're looking for. Once the e-mail is sent it is out of your control. Maybe there is a way to reproduce Microsoft Outlook's functionality and request a response when the user is about to open the e-mail but as far as I know the

Re: [Rails] habtm relation, cannot populate join table

2010-04-22 Thread Rick DeNatale
On Wed, Apr 21, 2010 at 8:08 AM, Veena Jose li...@ruby-forum.com wrote: Hai friends, I hav two models related with habtm class User ActiveRecord::Base  has_and_belongs_to_many :station,                          :join_table = stations_users,                          :foreign_key = user_id,

[Rails] Re: Using AR.connection.execute(sql) -- messing with my string?

2010-04-22 Thread pepe
My understanding was that MySQL does not allow multiple statements to be executed in one shot as a means to try and avoid piggy backing and hacking. Could be wrong, though. On Apr 21, 7:52 pm, Fearless Fool li...@ruby-forum.com wrote: Frederick Cheung wrote: when connecting via activerecord

[Rails] Re: Autoloading not working when using rake task

2010-04-22 Thread Dmitry Polushkin
Anyone, where to dig? On Apr 21, 8:17 pm, Dmitry Polushkin dmitry.polush...@gmail.com wrote: Hi, I have a problem when I'm doing rake tasks. This behavior happens only on one machine, on another three ones all works fine (three is on ubuntu, problem one is under debian); totally identical

[Rails] Re: Calling destroy on a model that has no id column

2010-04-22 Thread Lee Smith
Thanks for the help guys. pepe, this is not a legacy table so I think I'm just going to add the id and not fight conventions. The table is really just a link table...linking a user to an article and calling it a favorite. Nothing more...and that's why I went with the composite key. At least I

[Rails] Re: HOW TO Track How Many Recipients Open Your Mail IN RAILS?

2010-04-22 Thread Frederick Cheung
On Apr 22, 5:55 am, Tony Augustine li...@ruby-forum.com wrote: HOW  TO Track How Many Recipients Open Your Mail IN RAILS? please help me PROVIDE  SOLUTIONS AND  STEPS  OR ELSE  ANY  PLUGIN -- One trick is to include links to images with a tracking code embedded in them. As well as serving

[Rails] How to: Set a datetime params-value to nil in the controller

2010-04-22 Thread Tom Ha
Hi there, Suppose I submit an object called task from a form with... task[enddate(1i)] - 2011 task[enddate(2i)] - 3 task[enddate(3i)] - 1 ...how do I set the value 'params[:task][:enddate]' to 'nil' in the controller? I tried... params[:task][:enddate] = nil ...but that doesn't

[Rails] Re: Calling destroy on a model that has no id column

2010-04-22 Thread Frederick Cheung
On Apr 22, 3:07 pm, Lee Smith autige...@gmail.com wrote: Thanks for the help guys. pepe, this is not a legacy table so I think I'm just going to add the id and not fight conventions.  The table is really just a link table...linking a user to an article and calling it a favorite. Nothing

Re: [Rails] How to: Set a datetime params-value to nil in the controller

2010-04-22 Thread Colin Law
On 22 April 2010 15:22, Tom Ha li...@ruby-forum.com wrote: Hi there, Suppose I submit an object called task from a form with...  task[enddate(1i)]  -  2011  task[enddate(2i)]  -  3  task[enddate(3i)]  -  1 ...how do I set the value 'params[:task][:enddate]' to 'nil' in the controller?

Re: [Rails] How to: Set a datetime params-value to nil in the controller

2010-04-22 Thread Michael Pavling
On 22 April 2010 15:22, Tom Ha li...@ruby-forum.com wrote: ...how do I set the value 'params[:task][:enddate]' to 'nil' in the controller? I tried...  params[:task][:enddate] = nil ...but that doesn't seem to empty the attribute 'enddate'. What am I getting wrong? If it doesn't empty

[Rails] Re: Advice on memcached caching

2010-04-22 Thread Ar Chron
fredd wrote: This works great until someone changes it's personal information or avatar image. So the problem is, how do I invalidate the cache when an association gets updated? Page cache is a big hammer when maybe 1 attribute of 1 related entity has changed. What if you cached the row

[Rails] Model controlled by API calls

2010-04-22 Thread Thomas Allen
Hello, I was wondering if anybody knew of a library (acts_as_ or similar) that provides a simple framework for mapping ActiveRecord calls to API calls for model instances that are managed via API calls rather than a database connection. Thomas -- You received this message because you are

[Rails] How to automatically set params based on passed object when generating a route?

2010-04-22 Thread szimek
Hi, having i.e. a post model that has many categories - is it possible for member routes like i.e. post_path(post) to generate path like / posts/:post_category_name/:post_id without manually passing the category param? Does anyone know if there's a gem or if I can simply override the post_url

[Rails] Re: Re: why is ActiveRecord tying to select nonex ID column?

2010-04-22 Thread Fearless Fool
Rick Denatale wrote: Actually, I think what you want is to use has_many :through 1. add an id to metered_usages ... Rick -- bingo -- that's what I ended up doing. You probably already understood that metered_usage needs to carry additional data, so it couldn't be a pure HABTM table.

[Rails] puzzled by Mutex lock call ..

2010-04-22 Thread Jedrin
I have some code that uses and instance of Mutex and calls @mutex.lock, executes some code and then does unlock(). When I call lock() I get some ActiveRecord error which seems unrelated. Couldn't find ActiveJob with ID=3 [/home/LGuild/.gem/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/

[Rails] App to Pick up application release from Git/Capistrano?

2010-04-22 Thread Owain
My application is going into user testing and I would like to see which release the user has been testing against by the release appearing somewhere on the view. I can then check it on screen prints etc. I am using Git and Capistrano in a multi-stage environment. I expect I could access the

[Rails] Re: Calling destroy on a model that has no id column

2010-04-22 Thread Fearless Fool
Lee: Related, perhaps helpful: http://www.ruby-forum.com/topic/208279 You've arrived at the same conclusion: Rails expects an id field, and we all know that you can't fight Rails convention. But don't overlook all the goodies you get by declaring :has_many :through. - ff -- Posted via

[Rails] Re: Using AR.connection.execute(sql) -- messing with my string?

2010-04-22 Thread Fearless Fool
pepe wrote: My understanding was that MySQL does not allow multiple statements to be executed in one shot as a means to try and avoid piggy backing and hacking. Could be wrong, though. I now *also* understand that only one statement can be executed per call -- and the reasoning makes good

[Rails] specifying charset for selects

2010-04-22 Thread ES
How can I explicitly say that I want my select statements from the database to be in charset utf8? -- 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

[Rails] Re: Calling destroy on a model that has no id column

2010-04-22 Thread Marnen Laibow-Koser
Lee Smith wrote: Thanks for the help guys. pepe, this is not a legacy table so I think I'm just going to add the id and not fight conventions. The table is really just a link table...linking a user to an article and calling it a favorite. Nothing more...and that's why I went with the

[Rails] Re: How to: Set a datetime params-value to nil in the controller

2010-04-22 Thread Tom Ha
Thanks for your inputs. Unfortunately, I can add that: 1. Yes, the code definitely GETS executed 2. No, params[:task] is definitely NOT nil 2. Other values of the Task object in params CAN be set to nil, for example... params[:task][:name] = nil ...works correctly. Could it be that

[Rails] Re: RAILS not SCALABLE?

2010-04-22 Thread ChrisT
On Apr 21, 4:59 pm, David Zhu dzwestwindso...@gmail.com wrote: Heyyy First off, I love rails. Even thuogh I'm not as good as some of you guys here, but hey, I started couple months ago, and I am still on my way learning more. But I know there are downsides to Rails too. One of them is

Re: [Rails] Model controlled by API calls

2010-04-22 Thread Thomas Allen
It looks like ActiveResource is what I wanted. Thoma Thomas Allen wrote: Hello, I was wondering if anybody knew of a library (acts_as_ or similar) that provides a simple framework for mapping ActiveRecord calls to API calls for model instances that are managed via API calls

Re: [Rails] App to Pick up application release from Git/Capistrano?

2010-04-22 Thread Peter De Berdt
On 22 Apr 2010, at 18:00, Owain wrote: My application is going into user testing and I would like to see which release the user has been testing against by the release appearing somewhere on the view. I can then check it on screen prints etc. I am using Git and Capistrano in a multi-stage

[Rails] Re: display utf 8 characters in text fields in edit page

2010-04-22 Thread ES
It works if I write this as the value for the text field: value=%= @echantillon['material'].force_encoding('UTF-8') % Which means that when it is doing the SELECT from the database, it is not selecting it in UTF-8. How can I force it to do selects in UTF-8? On Apr 21, 10:40 am, ES

Re: [Rails] Re: display utf 8 characters in text fields in edit page

2010-04-22 Thread Amala Singh
you dont need to do this, if your setup is correct. On 22 April 2010 18:08, ES emsto...@gmail.com wrote: It works if I write this as the value for the text field: value=%= @echantillon['material'].force_encoding('UTF-8') % Which means that when it is doing the SELECT from the database,

Re: [Rails] App to Pick up application release from Git/Capistrano?

2010-04-22 Thread Rob Biedenharn
On Apr 22, 2010, at 1:02 PM, Peter De Berdt wrote: On 22 Apr 2010, at 18:00, Owain wrote: My application is going into user testing and I would like to see which release the user has been testing against by the release appearing somewhere on the view. I can then check it on screen prints

Re: [Rails] Re: Re: api.rubyonrails.org site is taken over by a domain

2010-04-22 Thread steve ross
On Apr 22, 2010, at 5:35 AM, Marnen Laibow-Koser wrote: Fernando Perez wrote: What a pointless remark. 37signals paid the renewal of the domain well beforehand, their registrar screwed up again. That's hardly their fault and has nothing to do with 37signal's infrastructure. It's 37signals'

[Rails] Re: Database query question

2010-04-22 Thread Marnen Laibow-Koser
Patrick Clas wrote: I thought this was possible using the update_all method of ActiveRecord...no? You're quite right. I had forgotten about that method. If not, then I will just write native sql commands instead. No, use something like ar-extensions if update_all won't do the trick. If

[Rails] Re: Database query question

2010-04-22 Thread Patrick Clas
Marnen Laibow-Koser wrote: Patrick Clas wrote: I thought this was possible using the update_all method of ActiveRecord...no? You're quite right. I had forgotten about that method. If not, then I will just write native sql commands instead. No, use something like ar-extensions if

Re: [Rails] Re: How to: Set a datetime params-value to nil in the controller

2010-04-22 Thread Colin Law
On 22 April 2010 17:58, Tom Ha li...@ruby-forum.com wrote: Thanks for your inputs. Unfortunately, I can add that: 1. Yes, the code definitely GETS executed 2. No, params[:task] is definitely NOT nil 2. Other values of the Task object in params CAN be set to nil, for example...  

[Rails] How does one set an HTTP header in @request for a functional test

2010-04-22 Thread Nathan Beyer
I have a very simple functional test for a controller, but I need to set a header field in the request before the invocation of the action, but the headers seem to be getting reset, even though I'm not doing multiple requests. Is this not how functional tests are to be used? test test the show

Re: [Rails] How does one set an HTTP header in @request for a functional test

2010-04-22 Thread steve ross
On Apr 22, 2010, at 12:18 PM, Nathan Beyer wrote: I have a very simple functional test for a controller, but I need to set a header field in the request before the invocation of the action, but the headers seem to be getting reset, even though I'm not doing multiple requests. Is this not how

[Rails] Re: Database query question

2010-04-22 Thread Marnen Laibow-Koser
Patrick Clas wrote: [...] Well the task isn't as simple as it seems. I have it working fine now with SQL, rails just seems to be lacking a bit in this area. So try ar-extensions or something. Of course I realize they have to be since they are supporting more than just mysql.

[Rails] Re: Sorting posts

2010-04-22 Thread Marnen Laibow-Koser
Michael Pavling wrote: On 21 April 2010 12:10, DanC d.m.coleg...@durham.ac.uk wrote: @topics = Topic.find(:all, :conditions = [forum_id = ?, @forum.id], :order = total_replies DESC) but I get the error Mcolumn total_replies does not exist I know the column doesn't exist, but the question

[Rails] Re: Database query question

2010-04-22 Thread Patrick Clas
Marnen Laibow-Koser wrote: Patrick Clas wrote: [...] Well the task isn't as simple as it seems. I have it working fine now with SQL, rails just seems to be lacking a bit in this area. So try ar-extensions or something. Of course I realize they have to be since they are supporting

[Rails] Re: puzzled by Mutex lock call ..

2010-04-22 Thread Frederick Cheung
On Apr 22, 5:00 pm, Jedrin jrubia...@gmail.com wrote:  I have some code that uses and instance of Mutex and calls @mutex.lock, executes some code and then does unlock(). When I call lock() I get some ActiveRecord error which seems unrelated. What are you calling lock on / how are you

Re: [Rails] Re: Re: Best practice around putting rails database info int

2010-04-22 Thread Rob Biedenharn
On Apr 22, 2010, at 9:06 AM, Marnen Laibow-Koser wrote: Rob Biedenharn wrote: [...] Matt, Pito, Marnen, and anyone else, 1. The opinion on whether db/schema.rb goes into the source repository has changed over time. No. I've used Rails since 1.2.6. Every version has put a comment in the

[Rails] Re: Database query question

2010-04-22 Thread Marnen Laibow-Koser
Patrick Clas wrote: [...] Any SQL database can do bulk updates, but mysql makes it easier by allowing table joins during updates. I suppose I could try to redesign my statement, but I don't see the need since I own the server I'm running on and mysql is always going to be there. That

[Rails] Re: How to: Set a datetime params-value to nil in the controller

2010-04-22 Thread Frederick Cheung
On Apr 22, 5:58 pm, Tom Ha li...@ruby-forum.com wrote: ...because the date gets submitted by a date_select? When I check what values get passed to params, I see...   task[enddate(1i)]  -  2011   task[enddate(2i)]  -  3   task[enddate(3i)]  -  1 Could it be that the problem stems from

[Rails] Re: Best practice around putting rails database info int

2010-04-22 Thread Frederick Cheung
On Apr 22, 4:04 pm, Rob Biedenharn r...@agileconsultingllc.com wrote: However, it is that same experience that has led me to the conclusion   that keeping db/schema.rb in the source repository is wrong.  It is   derived data and I would no more put it into the repository than I   would

[Rails] AR create_or_update_if_needed rant -- must be a better way!

2010-04-22 Thread Fearless Fool
I'll preface this by saying I (still) consider myself a relative newcomer to Rails, and its likely that I'm missing something obvious in ActiveRecords, but this has been bugging me... I've written a function that I use all the time, but I get a nagging feeling that this functionality MUST already

[Rails] Re: Database query question

2010-04-22 Thread Patrick Clas
Are point_diff and game.id coming from any sort of user input or form submissions? If so, you've just left yourself wide open to SQL injection attacks. Definitely not, thanks for your help. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed

[Rails] Re: Re: Re: Best practice around putting rails database info int

2010-04-22 Thread Marnen Laibow-Koser
Rob Biedenharn wrote: On Apr 22, 2010, at 9:06 AM, Marnen Laibow-Koser wrote: Rob Biedenharn wrote: [...] Matt, Pito, Marnen, and anyone else, 1. The opinion on whether db/schema.rb goes into the source repository has changed over time. No. I've used Rails since 1.2.6. Every

[Rails] Re: Best practice around putting rails database info int

2010-04-22 Thread Marnen Laibow-Koser
Frederick Cheung wrote: On Apr 22, 4:04�pm, Rob Biedenharn r...@agileconsultingllc.com wrote: However, it is that same experience that has led me to the conclusion � that keeping db/schema.rb in the source repository is wrong. �It is � derived data and I would no more put it into the

[Rails] what is the difference between instance_eval and class_eval?

2010-04-22 Thread woodsy0130
. -- 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...@googlegroups.com. For more options, visit

Re: [Rails] what is the difference between instance_eval and class_eval?

2010-04-22 Thread Leonardo Mateo
The same as between an instance and a class? -- Leonardo Mateo. There's no place 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

Re: [Rails] Re: Best practice around putting rails database info int

2010-04-22 Thread Rob Biedenharn
On Apr 22, 2010, at 4:23 PM, Frederick Cheung wrote: On Apr 22, 4:04 pm, Rob Biedenharn r...@agileconsultingllc.com wrote: However, it is that same experience that has led me to the conclusion that keeping db/schema.rb in the source repository is wrong. It is derived data and I would no more

[Rails] Re: puzzled by Mutex lock call ..

2010-04-22 Thread Jedrin
I do @mutex = Mutex.new and then @mutex.lock .. @mutex.unlock On Apr 22, 4:15 pm, Frederick Cheung frederick.che...@gmail.com wrote: On Apr 22, 5:00 pm, Jedrin jrubia...@gmail.com wrote:  I have some code that uses and instance of Mutex and calls @mutex.lock, executes some code and

[Rails] Re: checkboxes in a loop - I get the same id

2010-04-22 Thread oren
works, thank you! On Apr 19, 10:32 pm, Frederick Cheung frederick.che...@gmail.com wrote: On Apr 19, 9:19 pm, oren orengo...@gmail.com wrote: This is the output: input id=keys_to_update_ name=keys_to_update[] type=checkbox value=4 / input id=keys_to_update_ name=keys_to_update[]

[Rails] Re: STI Design Questions

2010-04-22 Thread DGerton
Thanks, Sharagoz. It is helpful. I guess you answered my big question, which was whether or not STI is still relevant. The design I've chosen is very similar to the one you describe. I don't have a need for the type of multiple choice that you describe, what I needed was more like what you call

[Rails] Re: Re: Re: api.rubyonrails.org site is taken over by a domain

2010-04-22 Thread Marnen Laibow-Koser
Steve Ross wrote: On Apr 22, 2010, at 5:35 AM, Marnen Laibow-Koser wrote: My thoughts exactly. Best, In case you missed DHH's announcement, the domain has been renewed through 2020. Unless there is some seriously flaky bookkeeping going on with the domain registrar, the issue

[Rails] Re: Caching of data on server?

2010-04-22 Thread Marnen Laibow-Koser
Sijo k g wrote: Hi Pieter Is it possible to create variables in the rails environment that persist globally - not as sessions - that would be too much porting of information forwards and back. This is possible by global variables in ruby (variables starts with @@ ) No, those are

[Rails] Re: SMS service

2010-04-22 Thread Marnen Laibow-Koser
Northband wrote: What's a good SMS service to use? I want to start sending messages from my apps via SMS. Thanks! Depends. In the U.S., you can just do this by e-mail -- all mobile phone carriers have e-mail-to-SMS gateways at no extra charge. In other countries, that may not work.

[Rails] Re: display utf 8 characters in text fields in edit page

2010-04-22 Thread Marnen Laibow-Koser
ES wrote: It works if I write this as the value for the text field: value=%= @echantillon['material'].force_encoding('UTF-8') % Which means that when it is doing the SELECT from the database, it is not selecting it in UTF-8. How can I force it to do selects in UTF-8? Is the database

[Rails] Re: Ubuntu Linux Editor / Prettiefier

2010-04-22 Thread Marnen Laibow-Koser
RVince wrote: Anyone aware of an editor I can use on Ubuntu that will do RoR syntax text coloring and a code prettiefier I can use under Linux for RoR code? Thanks R.Vince I'm fond of KomodoEdit. It's a very good editor and does nice syntax coloring for Ruby and Haml. Best, -- Marnen

[Rails] Re: Re: Re: api.rubyonrails.org site is taken over by a domain

2010-04-22 Thread Fernando Perez
In case you missed DHH's announcement, the domain has been renewed through 2020. Unless there is some seriously flaky bookkeeping going on with the domain registrar, the issue should not come up next year. Enough? Imagine what would happen if he was in charge of maintaining tweeter.com

[Rails] Re: SMS service

2010-04-22 Thread Fernando Perez
Depends. In the U.S., you can just do this by e-mail -- all mobile phone carriers have e-mail-to-SMS gateways at no extra charge. In other countries, that may not work. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org Any name of an email-to-sms provider? I'm

Re: [Rails] App to Pick up application release from Git/Capistrano?

2010-04-22 Thread Peter De Berdt
On 22 Apr 2010, at 20:02, Rob Biedenharn wrote: p = `cd #{RAILS_ROOT} git rev-parse HEAD`.strip = 031154343573f846dc4f9d31806e58438bfe783e q = `cd #{RAILS_ROOT} git show-ref`.strip = 031154343573f846dc4f9d31806e58438bfe783e refs/heads/master Would be best if you store the result in a

[Rails] hostingrails.com appears to have had an ownership change.

2010-04-22 Thread minka
Uggh, this happened to be me before, my site trashed when the host had business problems. I hope it won't be that bad. It seems Jumpline has taken over hostingrails and it also seems that there have been support transition problems. My site has been down on and off for over a week and what is

[Rails] Re: Rails 3 associations extra attributes with lazy loading

2010-04-22 Thread Will Prater
More observations I've found. The Arel includes method does not seem to respect HMT :select joins. I'd prefer to use the includes lazy- laoding way, but cannot seem to get the extra attributes to come back. Both will return the Manager Model ruby-1.8.7-p249

[Rails] can i have a model called FILE.RB?

2010-04-22 Thread David Zhu
Is file reserved? Can i use it for my model name? Because I am getting this error- NoMethodError in FilesController#new undefined method `quoted_table_name' for File:Class -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this

[Rails] script/plugin install not working

2010-04-22 Thread David Zhu
I'm trying to install paperclip -script/plugin install git://github.com/thoughtbot/paperclip.git But nothing happens, no error, it just goes over to the next line in my terminal. And im positive it isn't installed arleady, because the generateor doesnt work. Whats wrong? I'm running 2.3.5 --

[Rails] Re: script/plugin install not working

2010-04-22 Thread David Zhu
nvm i installed it as a gem. who cares now ;) On Apr 22, 9:14 pm, David Zhu dzwestwindso...@gmail.com wrote: I'm trying to install paperclip -script/plugin install git://github.com/thoughtbot/paperclip.git But nothing happens, no error, it just goes over to the next line in my terminal.

[Rails] Re: can i have a model called FILE.RB?

2010-04-22 Thread David Zhu
uGH! im answering my own questions!. sorry guys ill think b4 i post next time. here are the reserved words- http://newwiki.rubyonrails.org/rails/pages/reservedwords On Apr 22, 8:44 pm, David Zhu dzwestwindso...@gmail.com wrote: Is file reserved? Can i use it for my model name? Because I am

[Rails] Trying to receive emails with ActionMailer + Postfix

2010-04-22 Thread Webo Webo
I've been having a world of issues with trying to get ActionMailer (using Rails 3.0 beta 2) to receive emails from Postfix. Currently in Postfix's aliases file I have the line: rails_mailer: | /home/directory/to/app/script/rails runner 'MailReceive.recieve(STDIN.read)' And in my Mailer that

  1   2   >