[Rails] Re: NoMethodError: You have a nil object when you didn't expect

2010-05-28 Thread Manivannan J
On May 28, 9:39 am, Mathew Augustine wrote: > da manu.this prob is  related   with routes.yor  are  suppose to put that > method in routes.rb > > On Thu, May 27, 2010 at 5:13 PM, Manivannanj Jeganathan < > > > > li...@ruby-forum.com> wrote: > > Hi, > > >  I have tried to use searchlogic in my ap

[Rails] Re: NoMethodError: You have a nil object when you didn't expect

2010-05-28 Thread Manivannan J
On May 28, 9:39 am, Mathew Augustine wrote: > da manu.this prob is  related   with routes.yor  are  suppose to put that > method in routes.rb > > On Thu, May 27, 2010 at 5:13 PM, Manivannanj Jeganathan < > > > > li...@ruby-forum.com> wrote: > > Hi, > > >  I have tried to use searchlogic in my ap

[Rails] Re: Re: reset restful authentication user password from rail

2010-05-28 Thread Marnen Laibow-Koser
andrew v wrote: > Hi Marnen, > > Apparently I was looking in the wrong places or was reading dated RoR > stuff > 'cause wherever I looked RA was the overwhelming favorite for > authentication. It used to be. It's pretty easy to use, and its API isn't bad (though not as slick as Authlogic). Th

[Rails] Re: got nil error when i call 'all' in searchlogic

2010-05-28 Thread Manivannanj Jeganathan
Manivannanj Jeganathan wrote: > Hassan Schroeder wrote: >> On Fri, May 28, 2010 at 7:42 AM, Manivannan J >> wrote: >> >>> � � I have install searchlogic then tried in ruby script/console >>> >>> search=BankingDetail.search(:name_like_all=>"man") >>> search.all >>> >>> i got error when i call 'al

[Rails] Re: got nil error when i call 'all' in searchlogic

2010-05-28 Thread Manivannanj Jeganathan
Hassan Schroeder wrote: > On Fri, May 28, 2010 at 7:42 AM, Manivannan J > wrote: > >> � � I have install searchlogic then tried in ruby script/console >> >> search=BankingDetail.search(:name_like_all=>"man") >> search.all >> >> i got error when i call 'all' method >> >> NoMethodError: You have a

Re: [Rails] Re: reset restful authentication user password from rails co

2010-05-28 Thread andrew v
Hi Marnen, Apparently I was looking in the wrong places or was reading dated RoR stuff 'cause wherever I looked RA was the overwhelming favorite for authentication. But considering the problems I've had thus far with RA, I'll surely look into authlogic for my next project. If I run into any proble

Re: [Rails] Re: reset restful authentication user password from rails console

2010-05-28 Thread andrew v
Hi Fred, You got it spot on! It finally worked. I was barking up the wrong tree. Thanks a lot for your help mate! Now I've got to figure out the rest of the functionality for my application. But at least now I know where to seek help :) Cheers, Andrew On Fri, May 28, 2010 at 8:53 PM, Josh Cheek

[Rails] Re: Display only by date selected

2010-05-28 Thread Ar Chron
Matt Royer wrote: > I have the following code: > > > > Today's Activity > > > > <% @orders.reverse.each do |order| %> > <%= link_to_remote( "#{order.id}       #{order.name}" , > :url => {:controller => 'orders', :action => 'show', :id => order.id }, > :update => "order_div", :metho

Re: [Rails] Re: Beginner Facing Problem with rake db:migrate

2010-05-28 Thread Philip Hallstrom
On May 28, 2010, at 3:33 PM, Krishna Venkata wrote: > Hi Philip, > > Earlier I manual dropped all the tables that didn't fix the problem > Now used rake db:drop db:create db:migrate but still geting rake > aborted message.. > > C:\Murali Rubby\demo\library>rake db:drop db:create db:migrate

[Rails] Re: Beginner Facing Problem with rake db:migrate

2010-05-28 Thread Krishna Venkata
Hi Philip, Earlier I manual dropped all the tables that didn't fix the problem Now used rake db:drop db:create db:migrate but still geting rake aborted message.. C:\Murali Rubby\demo\library>rake db:drop db:create db:migrate (in C:/Murali Rubby/demo/library) rake aborted! Mysql::Error: Speci

Re: [Rails] Beginner Facing Problem with rake db:migrate

2010-05-28 Thread Philip Hallstrom
It looks like your mysql database already has a 'books' table. So either manually reset the database (and the schema) or run the appropriate rake tasks to undo what you've done... If you don't care about any of the data in there you could do > rake db:drop db:create db:migrate to get back to

[Rails] Re: Fixtures loading in Rails 3

2010-05-28 Thread Marnen Laibow-Koser
Ramos wrote: > Hello folks, > > Anyone knows how can we load fixtures in Rails 3. > Up to rails 2 there was a rake goal which performed the task > > rake db:fixtures:load > > But that disapeared with Rails 3. > > Any hints? Use factories. Fixtures are crap and should be avoided. > > Thanks,

[Rails] Beginner Facing Problem with rake db:migrate

2010-05-28 Thread Krishna Venkata
I am beginner for this Rails from the past 2 days I am working hard to fix the following error C:\Murali Rubby\demo\library>rake db:migrate --trace (in C:/Murali Rubby/demo/library) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate =

[Rails] Re: form helpers don't seem to work with RJS files...

2010-05-28 Thread Marnen Laibow-Koser
Steve Russo wrote: > Marnen, my apologies on mispelling your name. > > Given the flow of my code "Main html(view)->controller->RJS->rendered > partial", the error I recieve seems to be the result of the RJS file > calling a partial with form elements like "f.text_area" for example. Can't the pa

[Rails] Re: form helpers don't seem to work with RJS files...

2010-05-28 Thread Steve Russo
Marnen, my apologies on mispelling your name. Given the flow of my code "Main html(view)->controller->RJS->rendered partial", the error I recieve seems to be the result of the RJS file calling a partial with form elements like "f.text_area" for example. When the form builder object "f" is not p

[Rails] Message error with XML/SWF Charts

2010-05-28 Thread Jorge alejandro Mendoza torres
I'm making a web site with charts, I'm using "XML/SWF Charts", the problem that I have is that the charts work perfectly when I'm working locally, but when I load all files to the server and I want to see the charts, the browser shows me the next message: This page requires AC_RunActiveContent.js.

[Rails] stopping accidental form submissions

2010-05-28 Thread soheil danesh
Hi, I'm using rails 3 and have an ajax form where users can add data, click submit, and it will be appended to a feed. The problem is if the users click submit (or press enter) multiple times, the form seems to be submitted multiple times as well resulting in the same item showing in the feed mult

[Rails] Re: Using update_attributes(params[:something]) w/ manual assignment

2010-05-28 Thread Perry Smith
> So I guess this rules out all but a some plugin interference; I'll look > into it; > Do you know of a good way to do this? What database are you using? Maybe this feature is just for some of the databases but not all? (That wouldn't make much sense to me but its a thought.) It seems like

[Rails] Re: Using update_attributes(params[:something]) w/ manual assignment

2010-05-28 Thread Jose Ambros-ingerson
In fact, I just tried the most simple case and I see an mySQL update >> a = Language.first Language Load (0.5ms) SELECT * FROM `languages` LIMIT 1 ++-++ | id | name| locale | ++-++ | 1 | Español | es | ++-++ 1 row in set >>

[Rails] Re: Using update_attributes(params[:something]) w/ manual assignment

2010-05-28 Thread Jose Ambros-ingerson
Perry Smith wrote: > Jose Ambros-ingerson wrote: >> Frederick Cheung wrote: >> >> THanks Fred and Perry for your replies. >> I followed up on your suggestions yet I have not been able to make it >> work as advertised. >> As shown in the example below I've made sure that >> ActiveRecord::Base.pa

[Rails] Re: Using update_attributes(params[:something]) w/ manual assignment

2010-05-28 Thread Perry Smith
Jose Ambros-ingerson wrote: > Frederick Cheung wrote: >> On May 27, 10:55�pm, Jose Ambros-ingerson >> wrote: >> >> Actually that bit in the logs show the name getting set to spanish as >> well. It's also possible that you've turned off this behaviour - >> ActiveRecord::Base.partial_updates (or so

[Rails] Re: Using update_attributes(params[:something]) w/ manual assignment

2010-05-28 Thread Jose Ambros-ingerson
Frederick Cheung wrote: > On May 27, 10:55�pm, Jose Ambros-ingerson > wrote: > > Actually that bit in the logs show the name getting set to spanish as > well. It's also possible that you've turned off this behaviour - > ActiveRecord::Base.partial_updates (or something along those lines) > control

[Rails] Re: New Project > Rails 2 or 3 ?

2010-05-28 Thread Robert Walker
brianp wrote: > Working on a project for a new startup. We started it in Rails 2.3.5. > but now the project manager is talking about wanting to switch to > Rails 3 because it's the hot new thing. > > Whats the consensus if rails is ready for production environments that > the customers will depend

[Rails] Re: form helpers don't seem to work with RJS files...

2010-05-28 Thread Marnen Laibow-Koser
Steve Russo wrote: [...] >>> How can I get observe_field to pass the object itself? >> >> Why do you want to? Your controller shouldn't normally be dealing with >> FormBuilder objects. What are you trying to achieve? >> >> Best, >> -- >> Marnen Laibow-Koser >> http://www.marnen.org >> mar...@m

[Rails] Link in YUI js not rendered by rails.

2010-05-28 Thread koicat
Using YAHOO.widget.treeview to generate a table with three levels of data: module, submodule, and detail. If there is an image associated with a detail row the javascript generates a link: "Screenshot" that is appended to the html for the row. The url is generated correctly and the link ap

[Rails] Re: form helpers don't seem to work with RJS files...

2010-05-28 Thread Steve Russo
Marnen Laibow-Koser wrote: > Steve Russo wrote: >> Ahh! That makes sense. Now... :) Fred you're my new hero! >> >> So the problem seems to be I'm not correctly passing the form_builder >> from my view file to the controller. >> >> view file >> = >> >> <%= observe_field("trial_org

[Rails] Re: form helpers don't seem to work with RJS files...

2010-05-28 Thread Marnen Laibow-Koser
Steve Russo wrote: > Ahh! That makes sense. Now... :) Fred you're my new hero! > > So the problem seems to be I'm not correctly passing the form_builder > from my view file to the controller. > > view file > = > > <%= observe_field("trial_org_id", :url => {:action => :observe, >

[Rails] Re: problems with render in store.html.erb

2010-05-28 Thread Matt Royer
Omar Moreno wrote: > Working on Agile web development with rails, 3rd edition. > > Every time I put > <%= render(:partial => "cart" , :object => @cart) %> > in store.html.erb, it makes a "" disappear(well, it doesn't show > up when I check with firebug). > > When I take this piece of code

[Rails] Re: form helpers don't seem to work with RJS files...

2010-05-28 Thread Steve Russo
Ahh! That makes sense. Now... :) Fred you're my new hero! So the problem seems to be I'm not correctly passing the form_builder from my view file to the controller. view file = <%= observe_field("trial_org_id", :url => {:action => :observe, :trial_id => @trial.id, :f=> f}, :with

[Rails] Re: problem with the getting started tutorial

2010-05-28 Thread Marnen Laibow-Koser
Roelof Wobben wrote: > Juan Pablo Genovese wrote: >> Is your MySQL instance running in the same computer? If no, did you open >> the >> port 3306? >> Did you create the corresponding users and granted them access and >> sufficient permissions to do the required tasks? >> >> 2010/5/28 Roelof Wobbe

Re: [Rails] Re: problem with the getting started tutorial

2010-05-28 Thread Juan Pablo Genovese
Well... no. Don't ask that. NetBeans, as good as it is, is a simple IDE. It's like a text editor on steroids, if you know what I mean. It will help you a lot with many tasks, but it won't install or configure MySQL for you. You need to install MySQL and create and grant the necessary users and perm

[Rails] Re: problem with the getting started tutorial

2010-05-28 Thread Roelof Wobben
Juan Pablo Genovese wrote: > Is your MySQL instance running in the same computer? If no, did you open > the > port 3306? > Did you create the corresponding users and granted them access and > sufficient permissions to do the required tasks? > > 2010/5/28 Roelof Wobben Hello Juan Pablo Genovese

[Rails] Re: HTML character codes in ActionMailer subject

2010-05-28 Thread Marnen Laibow-Koser
Jaap Haagmans wrote: > Let me put in another way: we have multiple people updating the > language strings in the YAML files. For people working on OS X, the > characters will show up as squares on Linux and vice versa. I only > control one of these systems. How would you approach this? Put the UT

[Rails] Re: reset restful authentication user password from rails co

2010-05-28 Thread Marnen Laibow-Koser
andrew v wrote: > Hi, > > I have implemented restful authentication plugin in my rails > application. [...] Great. Now take it out and put in Authlogic or something. restful_authentication relies on unmaintainable generated code, and no Rails developer should even consider using it now that b

[Rails] problem with the getting started tutorial

2010-05-28 Thread Roelof Wobben
Hello, As soon as I do the database migration I see this error message : (in /home/roelof/NetBeansProjects/ruby Weblog) rake aborted! The driver encountered an error: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** ja

[Rails] Re: HTML character codes in ActionMailer subject

2010-05-28 Thread jhaagmans
Let me put in another way: we have multiple people updating the language strings in the YAML files. For people working on OS X, the characters will show up as squares on Linux and vice versa. I only control one of these systems. How would you approach this? Our approach has worked for some time now

[Rails] Re: One Array - 3 Columns of Equal Length

2010-05-28 Thread Marnen Laibow-Koser
[...] > ## Column-wise is a bit more work > > irb> row_count = (array.length + (3-1))/3 > => 5 > irb> columns = [] > => [] [...] Why go to all that trouble? in_groups and zip. Done. No arithmetic. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted via http://www.r

Re: [Rails] One Array - 3 Columns of Equal Length

2010-05-28 Thread Michael Pavling
On 28 May 2010 15:10, Rob Biedenharn wrote: > irb> row_count = (array.length + (3-1))/3 That looks a little clunky to me... I'd rather use (array.length / 3.0).ceil No difference in the result though! :-) But the OP's request is a little vague as people have pointed out - Should the three gr

[Rails] Display only by date selected

2010-05-28 Thread Matt Royer
I have the following code: Today's Activity <% @orders.reverse.each do |order| %> <%= link_to_remote( "#{order.id}       #{order.name}" , :url => {:controller => 'orders', :action => 'show', :id => order.id }, :update => "order_div", :method => 'get' ) %> <% end %> This

[Rails] problems with render in store.html.erb

2010-05-28 Thread Omar Moreno
Working on Agile web development with rails, 3rd edition. Every time I put <%= render(:partial => "cart" , :object => @cart) %> in store.html.erb, it makes a "" disappear(well, it doesn't show up when I check with firebug). When I take this piece of code out, the display returns to normal

[Rails] New Project > Rails 2 or 3 ?

2010-05-28 Thread brianp
Hey, Working on a project for a new startup. We started it in Rails 2.3.5. but now the project manager is talking about wanting to switch to Rails 3 because it's the hot new thing. Whats the consensus if rails is ready for production environments that the customers will depend on? I haven't looke

[Rails] Re: Re: HTML character codes in ActionMailer subject

2010-05-28 Thread Marnen Laibow-Koser
Hassan Schroeder wrote: > On Thu, May 27, 2010 at 10:35 PM, jhaagmans > wrote: >>> > We have our e-mail subjects stored in I18n locale files. For the >>> > English version of the website, we had no problem, but now we're >>> > translating to German, which uses a lot of symbols like ü and >>> > Ü

[Rails] Fixtures loading in Rails 3

2010-05-28 Thread Ramos
Hello folks, Anyone knows how can we load fixtures in Rails 3. Up to rails 2 there was a rake goal which performed the task rake db:fixtures:load But that disapeared with Rails 3. Any hints? Thanks, Ramos. -- You received this message because you are subscribed to the Google Groups "Ruby on

Re: [Rails] got nil error when i call 'all' in searchlogic

2010-05-28 Thread Hassan Schroeder
On Fri, May 28, 2010 at 7:42 AM, Manivannan J wrote: >     I have install searchlogic then tried in ruby script/console > > search=BankingDetail.search(:name_like_all=>"man") > search.all > > i got error when i call 'all' method > > NoMethodError: You have a nil object when you didn't expect it!

[Rails] Problem with character set utf8

2010-05-28 Thread Ziburu Debian
Hi, I have create an empty rails project on aptana; I have manually, on PhpMyAdmin, create my database. When i run rake db:migrate under Aptana, i have this message : rake aborted! NoMethodError: undefined method `ord' for 0:Fixnum: SET NAMES 'utf8' Is anyone have an idea Thanks My config : Wi

Re: [Rails] Re: reset restful authentication user password from rails console

2010-05-28 Thread Josh Cheek
On Fri, May 28, 2010 at 9:49 AM, andrew v wrote: > > > On Fri, May 28, 2010 at 6:07 PM, Frederick Cheung < > frederick.che...@gmail.com> wrote: > >> >> >> On May 28, 12:11 pm, andrew v wrote: >> > Hi, >> > >> > I have implemented restful authentication plugin in my rails >> application. >> > It'

[Rails] Re: form helpers don't seem to work with RJS files...

2010-05-28 Thread Frederick Cheung
On May 28, 3:25 pm, Steve Russo wrote: > I’ve been spending a great deal of time chasing this problem. Hopefully > someone sees something obvious I’m doing wrong. Basically anytime I try > to call fields_for from an RJS file or within a partial in the RJS file, > I get the following error. My go

Re: [Rails] Re: HTML character codes in ActionMailer subject

2010-05-28 Thread Hassan Schroeder
On Thu, May 27, 2010 at 10:35 PM, jhaagmans wrote: >> > We have our e-mail subjects stored in I18n locale files. For the >> > English version of the website, we had no problem, but now we're >> > translating to German, which uses a lot of symbols like ü and >> > Ü for example. We store them as cha

[Rails] Re: reset restful authentication user password from rails console

2010-05-28 Thread Frederick Cheung
On May 28, 3:49 pm, andrew v wrote: > On Fri, May 28, 2010 at 6:07 PM, Frederick Cheung < > The users table has crypted_password, and salt columns which is giving me > problems when I try to reset password from the console.After reading the > documentation for restful authentication, it appears t

[Rails] Rack error: bad body content

2010-05-28 Thread Sam Kong
Hi, I get an error like the following. /!\ FAILSAFE /!\ 05/27/2010 12:50 Status: 500 Internal Server Error bad content body /usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/utils.rb:319:in `parse_multipart' It happens when I update a page with images. This doesn't happen on development s

Re: [Rails] Re: reset restful authentication user password from rails console

2010-05-28 Thread andrew v
On Fri, May 28, 2010 at 6:07 PM, Frederick Cheung < frederick.che...@gmail.com> wrote: > > > On May 28, 12:11 pm, andrew v wrote: > > Hi, > > > > I have implemented restful authentication plugin in my rails application. > > It's a barebones implementation without activation, forget password > fea

[Rails] got nil error when i call 'all' in searchlogic

2010-05-28 Thread Manivannan J
Hi, I have install searchlogic then tried in ruby script/console search=BankingDetail.search(:name_like_all=>"man") search.all i got error when i call 'all' method NoMethodError: You have a nil object when you didn't expect it! You might have expected an instance of ActiveRecord::Base. The

[Rails] Re: Ajax submit: Clicking 'Submit' vs. hitting ENTER

2010-05-28 Thread Tom Ha
Thanks for all the feedback! Fred's nailed it and all other hints were instructive as well! -- 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...@

[Rails] Re: link_to pmultiple parameters

2010-05-28 Thread Bhaby Mhan
Oh sorry for that!!! I submitted by mistake and can't find the Edit link. So as i said, here is the code : <%= link_to 'Delete engineer', delete_engineer_role_project_path(@project) %> let's say i want to pass the value 10 how would i do that? Thanks in advance. -- Posted via http://www.ruby-

[Rails] link_to pmultiple parameters

2010-05-28 Thread Bhaby Mhan
Hi everybody! I'm new to this wondeful world that Ruby On Rails is. I'm trying to pass multiple parameters using link_to, but i don't even know if it's possible. Here's the code in where the link_to is used : -- Posted via http://www.ruby-forum.com/. -- You received this message because you a

[Rails] form helpers don't seem to work with RJS files...

2010-05-28 Thread Steve Russo
I’ve been spending a great deal of time chasing this problem. Hopefully someone sees something obvious I’m doing wrong. Basically anytime I try to call fields_for from an RJS file or within a partial in the RJS file, I get the following error. My goal is simply to load a partial into a div. The fie

Re: [Rails] One Array - 3 Columns of Equal Length

2010-05-28 Thread Rob Biedenharn
On May 28, 2010, at 9:47 AM, Pale Horse wrote: I want to split a single array into 3 columns of equal (or as near to as possible) length. What would you advise I do? Well, that depends on whether you want the elements to flow row-wise or column-wise. irb> require 'enumerator' => true irb

Re: [Rails] Re: One Array - 3 Columns of Equal Length

2010-05-28 Thread Andy Jeffries
> > http://weblog.rubyonrails.org/2006/3/1/new-in-rails-enumerable-group_by-and-array-in_groups_of > > enjoy! > This isn't quite the same thing though. >> a = %w(1 2 3 4 5 6 7 8 9 10) >> a.in_groups_of(3) => [["1", "2", "3"], ["4", "5", "6"], ["7", "8", "9"], ["10", nil, nil]] It gives you 4 gr

[Rails] Re: One Array - 3 Columns of Equal Length

2010-05-28 Thread Pale Horse
chewmanfoo wrote: > http://weblog.rubyonrails.org/2006/3/1/new-in-rails-enumerable-group_by-and-array-in_groups_of > > enjoy! Thank you for your quick response. Sadly, I can't get this array method to do what I wish. See below: > <% Category.all.in_groups_of(3, false) do |sorted_categories| %>

[Rails] Working with method from controller in button

2010-05-28 Thread Sascha Popovic
Hi. I'm new to ror. I would like to refresh the data in the index view. To do this, i wanted to use a button. I also want to limit the data in the index view with the conditions parameter. I want to use this with anoter button. Can someone please help me? I searched for hours in the internet w

Re: [Rails] Re: console ThreadError ("thread ... tried to join itself")

2010-05-28 Thread Jarl Friis
pfs writes: > m. this is not a snow leopard issue, try running "script/console > production" and it will work. Because you need to have > config.cache_classes set to true in the environment, and development > you probably want to that turned off. Take a look at this. Seems like it is fixed in la

[Rails] Re: One Array - 3 Columns of Equal Length

2010-05-28 Thread chewmanfoo
http://weblog.rubyonrails.org/2006/3/1/new-in-rails-enumerable-group_by-and-array-in_groups_of enjoy! On May 28, 8:47 am, Pale Horse wrote: > I want to split a single array into 3 columns of equal (or as near to as > possible) length. What would you advise I do? > -- > Posted viahttp://www.ruby-

[Rails] One Array - 3 Columns of Equal Length

2010-05-28 Thread Pale Horse
I want to split a single array into 3 columns of equal (or as near to as possible) length. What would you advise I do? -- 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

[Rails] Rake Aborted! db:migrate

2010-05-28 Thread Distriker
Hello, I am trying do a migrate of my database but I have problems, I write this in the console: [console] rake db:migrate [/console] And say me: [console] (in /home/distriker/Documentos/public_html/crf) !!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql ge

[Rails] Re: strange behaviour in 'and' with params

2010-05-28 Thread Ale Ds
Frederick Cheung wrote: > On May 28, 11:44�am, Ale Ds wrote: > ... > and has very low precedence, so ruby actually treats this as > > (user_params = (params[:user_param])) and > (params[:user_param].to_hash) > > && on the other hand binds more tightly and would do what you expect. > > Fred I w

Re: [Rails] Question on Rails 3 : forms && ORM && ActiveModel

2010-05-28 Thread Gael Muller
On Thu, May 27, 2010 at 8:01 AM, Alexandru Nedelcu wrote: > I'm a Django/Catalyst user that's evaluating Rails ... I need a Ruby > framework, and I'm trying to see if learning Rails is worth it or I > should just go for Sinatra + various libs available. > > Django has a couple of things I like ...

[Rails] Re: reset restful authentication user password from rails console

2010-05-28 Thread Frederick Cheung
On May 28, 12:11 pm, andrew v wrote: > Hi, > > I have implemented restful authentication plugin in my rails application. > It's a barebones implementation without activation, forget password features > ...etc. I was wondering if it is possible to reset a User's password from > the rails console?

[Rails] Globbing for map.resources?

2010-05-28 Thread Andreas
Hey Is there any way to use globbing for routes with map.resources? I want a url to fetch multiple records at a time with my show action. Something like this: /photos/1/2/3/.../ Regards, Andreas Falk -- You received this message because you are subscribed to the Google Groups "Ruby on Rails:

[Rails] Re: Ajax submit: Clicking 'Submit' vs. hitting ENTER

2010-05-28 Thread Manivannan J
On May 27, 10:24 pm, Tom Ha wrote: > Hi there, > > Has anyone an idea why the below form > - submits correctly when I click the 'Submit' button > - but does call the 'new' action instead of 'create' when I hit ENTER? > > <% form_remote_tag :html => { :action => url_for(:controller => 'pages', >

[Rails] Re: console ThreadError ("thread ... tried to join itself")

2010-05-28 Thread pfs
m. this is not a snow leopard issue, try running "script/console production" and it will work. Because you need to have config.cache_classes set to true in the environment, and development you probably want to that turned off. /Pontus On May 9, 7:27 pm, mattn wrote: > I'm just getting started wi

[Rails] reset restful authentication user password from rails console

2010-05-28 Thread andrew v
Hi, I have implemented restful authentication plugin in my rails application. It's a barebones implementation without activation, forget password features ...etc. I was wondering if it is possible to reset a User's password from the rails console? As things stand now, there is no other way to rese

[Rails] Re: strange behaviour in 'and' with params

2010-05-28 Thread Frederick Cheung
On May 28, 11:44 am, Ale Ds wrote: > I need to convert the user_param HashWithIndifferentAccess in simple > Hash (to convert it in YAML) > > I noticed a weird behavior: > > Why if I use (in a controller): > user_params = (params[:user_param].to_hash) > > user_params is a Hash > as I expected > >

[Rails] Re: Ajax submit: Clicking 'Submit' vs. hitting ENTER

2010-05-28 Thread Manivannan J
On May 27, 10:24 pm, Tom Ha wrote: > Hi there, > > Has anyone an idea why the below form > - submits correctly when I click the 'Submit' button > - but does call the 'new' action instead of 'create' when I hit ENTER? > > <% form_remote_tag :html => { :action => url_for(:controller => 'pages', >

[Rails] Re: Ajax submit: Clicking 'Submit' vs. hitting ENTER

2010-05-28 Thread Manivannan J
On May 27, 10:24 pm, Tom Ha wrote: > Hi there, > > Has anyone an idea why the below form > - submits correctly when I click the 'Submit' button > - but does call the 'new' action instead of 'create' when I hit ENTER? > > <% form_remote_tag :html => { :action => url_for(:controller => 'pages', >

[Rails] div updating on checking a radio button

2010-05-28 Thread swetha
I have a problem in updating a div ,when a radio is checked. new.html.erb --- <% form_for @account, :url => account_path do |f| %> <%= f.error_messages %> <%= render :partial => "form", :object => f %> <%= f.submit "Register" %> <% end %> _form.html.erb -

Re: [Rails] Find last entry from each category

2010-05-28 Thread Michael Pavling
On 10 May 2010 10:09, Sebastian Kranz wrote: > how can I get the last entry (max published_at) for each author > The result should be a array with news items 1,4,7 Have you looked at using the "group_by" method of Enumberable? http://apidock.com/rails/Enumerable/group_by You could use it to gro

[Rails] dynamically generating subdomains using subdomain-fu

2010-05-28 Thread swetha
hi, I am using subdomain-fu for creating subdomains . My doubt is how can we give the subdomains in the etc/hosts ,when the sub-domains are dynamicallybeing created. Ex: i created a subdomain called "user1" and i specified this in etc/ hosts file.So eveery time i cant specify the subdomain whi

[Rails] strange behaviour in 'and' with params

2010-05-28 Thread Ale Ds
I need to convert the user_param HashWithIndifferentAccess in simple Hash (to convert it in YAML) I noticed a weird behavior: Why if I use (in a controller): user_params = (params[:user_param].to_hash) user_params is a Hash as I expected and if I use: user_params = (params[:user_param]) and (p

[Rails] Re: Find last entry from each category

2010-05-28 Thread Sebastian Kranz
No ideas to solve this problem? :( -- 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 ema

[Rails] Re: Ports/Connections not being released?

2010-05-28 Thread Pieter Hugo
Peter De Berdt wrote: > > Could this be related to running an old version of Juggernaut? > Hi Peter Thanks for the suggestion. Looked into it. I am running Juggernaut 0.5.8 on both the Vista and Mac machines. On Vista the loop freezes after 130 iterations. On mac it didnt freeze after 10 000.

[Rails] Re: How to have *_url generate urls with https:// proto

2010-05-28 Thread Mutesa
Hi Errol, If you want to pull out data in csv format from an existing mysql database using Rails, this is the easiest way to do it : 1. install fastercsv : sudo gem install fastercsv 2. Add on top of your controller : require 'fastercsv' 3. Create an action in your controller and its correspondin

[Rails] Re: Creating a report generator within a mysql database to be read on rails.

2010-05-28 Thread Mutesa
Hi, I don't know if i got you right, but it seems that you are trying to import your mysql data into csv report? Well, the easiest way to do this is using the fastercsv gem. 1. Install gem : sudo gem install fastercsv 2. Add on top of your controller : require 'fastercsv' 2. Create your action an

[Rails] Packaging of gems in app dir

2010-05-28 Thread Mike Disuza
Hi, I have got the source code of one of my clients, which has the "gems" directory in the vendor folder where all app gems are installed. Can anyone tell me how to do that? Thanks, Mike -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Go

Re: [Rails] cookie has key/value pairs and lost order after JSON decode

2010-05-28 Thread Andy Jeffries
>  ActiveSupport::JSON.decode(cookies['item_list']) > > and the result is actually in a hash, then the ordering is lost... > > Is it true that if the original JSON object has an array of hashes (1 > key and 1 value), then the order can be preserved? > > But what if the original JSON object was a ha

[Rails] Re: Generator Documentation

2010-05-28 Thread Alex P
Here's a great railscast upon the subject: http://railscasts.com/episodes/58-how-to-make-a-generator I would just download the Rails Code, and do the same thing they do. On May 27, 2:26 pm, James wrote: > Sorry, to clarify this I mean in *writing* my own generators - using the > Thor built in ac

[Rails] Re: A few questions before i start to programm

2010-05-28 Thread Alex P
Well, it's all quite simple. Create a model script/generate model team played_game:boolean name:string and it will generate model and migration for you :) Just get trough the tutorial. I guarantee, you'll find all the answers. For your particular application it will work 100% On May 27, 2:40 pm,

[Rails] NoMethodError: You have a nil object when you didn't expect

2010-05-28 Thread Manivannan J
Hi, I have tried to use searchlogic in my application... in def index, @search = AccounDetail.search(params[:search]) @account_details = @search.all In index.rhtml <%form_for @search do |f|%> <%=f.label :name_like,"Name"%> <%=f.text_field :name_like%> <%=submit_tag :Search,:nam

[Rails] cookie has key/value pairs and lost order after JSON decode

2010-05-28 Thread Jian Lin
If a cookie has several items, and is encoded as JSON text as the value of the cookie, the order is actually apparent in the cookie's text But if JSON.decode is used: ActiveSupport::JSON.decode(cookies['item_list']) and the result is actually in a hash, then the ordering is lost... Is it true