[Rails] Property of text area in readonly mode

2009-02-04 Thread sam rlo
Hi all, How to make an html textarea read only in one mode and make the same textfield as editable in other mode? can anyone give me a solution for this? Thanks in advance -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message b

[Rails] Re: setup up svn on my server

2009-02-04 Thread Ankit Parekh
MaD wrote: > isn't capistrano a great way to do it? > > just write a little rake task to match your needs and all it takes is > one single call. yes capistrano is the best way out but i wanted to find out something else. Thanks a lot for your help -- Posted via http://www.ruby-forum.com/. --

[Rails] Re: small doubt HELP me

2009-02-04 Thread Shankar Ganesh
Can you explain with a bit of code, It will be helpful for me apologizes I'm newbie to ROR and I'm a PHP developer.I would like to develop calendar using ROR when I am ti display the events I got struck here. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~--

[Rails] Re: setup up svn on my server

2009-02-04 Thread MaD
isn't capistrano a great way to do it? just write a little rake task to match your needs and all it takes is one single call. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to th

[Rails] Re: small doubt HELP me

2009-02-04 Thread MaD
#1 well, if you just go like this: entry.when - entry.to you'll get the seconds in between both times. you can then calculate minutes, hours, days, ... #2 filling in the values should then be a piece of cake. #3 what you are looking for is not an array, but a hash. shouldn't be problem, once y

[Rails] Re: small doubt HELP me

2009-02-04 Thread Shankar Ganesh
Hello, This is not as regular we do for all tables.Look at the table you can see two fields 'when' and 'to'. What I need is #1 must find the range of dates between 'when' and 'to' fields, #2 Then I must fill the value for each date with the corresponding values. #3 Should make an array wit

[Rails] Re: small doubt HELP me

2009-02-04 Thread MaD
this is really basic, basic, basic stuff. you should really read up on your basics instead of asking people to code for you. anyway, in your controller get all the entries you want to desplay: @entries = Entry.all then in your view iterate through all entries: <% for entry in @entries do %>

[Rails] Re: setup up svn on my server

2009-02-04 Thread Ankit Parekh
MaD wrote: > for deployment of rails-apps take a look at capistrano: > http://www.capify.org/ Yes I know capistrano but isnt there any other way out to do it? -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you a

[Rails] Re: setup up svn on my server

2009-02-04 Thread MaD
for deployment of rails-apps take a look at capistrano: http://www.capify.org/ --~--~-~--~~~---~--~~ 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@google

[Rails] setup up svn on my server

2009-02-04 Thread Ankit Parekh
Hi all Here is the thing that I want to do. What I want is that As soon as I commit the changes to my svn which resides on beanstalk i want those changes to get reflected to my website too. Can any one tell me a step by step process to do it? Or provide me a link for the same. Thanks -- Posted

[Rails] Re: update_attributes not working on production environment

2009-02-04 Thread Hema
Hi, Where I have to check in vendor directory I have the plugins directory only containing 1. validates_date_and_time 2. restful_authentication 3. rubyamf On Feb 4, 6:38 pm, Julian Leviston wrote: > Your model didn't appear to inherit from active record base. > > Blog:http://random

[Rails] get # of errors in error_messages_for

2009-02-04 Thread Johnroy World
hi everyone here i go again, i have problem we error message validation here is the sample of my code: error_messages_for :user, :header_message => 'X errors, please find red mark', :message => 'Following errors were found:' the problem is that how where going to get the value "X errors" or the

[Rails] No sequence is needed

2009-02-04 Thread Sijo Kg
Hi I would like to know how can i generate a model, without generating the sequence table in postgresql..Currently for example when I do def self.up create_table :table1 do |t| A sequence is automatically generated like tables_id_seq Thanks in advance Sijo -- Posted via http:

[Rails] how to use Sitealizer Web Stats step bu step?

2009-02-04 Thread Vikas Gholap
Hi all, I am using Sitealizer in Rails 2.2 version. Sitealizer uses .rhtml file format. It is not acceptable in rails 2.2? Can any one give tell me step by step use of Sitealizer in rails application.? -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~--

[Rails] Re: rendering error page for "Unauthorized" from before_filter

2009-02-04 Thread Xie Hanjian
Hi, Maybe you should try render_optional_error_file Jan * balint.e...@gmail.com [2009-02-04 13:52:59 -0800]: > > Hey all, > > I am writing a plugin in which I want to stop the rendering of an > action with an unauthorized response if the user is not authorized to > view the resource. I am u

[Rails] Re: small doubt HELP me

2009-02-04 Thread Shankar Ganesh
Ram, Thanks for your help dude.Yes, I would like to have the output in the 'view' and the value should be fetched based on 'when' and 'to' fields. cheers, shankar. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message be

[Rails] Re: small doubt HELP me

2009-02-04 Thread Ram
Hi Shankar, It would help if you explained where exactly you want that kind of output. In the views? and by "2009-02-12=>" you mean the query to the DB should be based on the 'when' field? On Feb 5, 8:33 am, Shankar Ganesh wrote: > Hi all, > >      My apologies for posting a small amount of dat

[Rails] Re: Help convert code form PHP to Rails.

2009-02-04 Thread Shankar Ganesh
The value for the corresponding date range is not inserting appropriately. I shall give an example here, consider : for 'id' as 1, date of 'when' as 2009-02-01,date of 'to' 2009-02-15,'what' as test date between days ! and 'color' as #DD5511 for 'id' as 2, date of 'when' as 2009-02-02,da

[Rails] Re: Drop Down Select List from model

2009-02-04 Thread Ram
You seem to be complicating things. I think this is what you need <%= collection_select(:state, :country_id, Country.find (:all), :id, :cou_name, {:prompt => "select country"}) %> you do not need the "select" method in the controller for this. Unless of course you WANT an Ajax call to be made f

[Rails] Re: Help convert code form PHP to Rails.

2009-02-04 Thread Julian Leviston
Ok how does it not work? Blog: http://random8.zenunit.com/ Learn rails: http://sensei.zenunit.com/ On 05/02/2009, at 3:27 PM, Shankar Ganesh wrote: > > Hi Julian, > >Here is what the code I tried > > <% result=[]%> > <%date=[] %> > > ## An array from database with select all query > > <%

[Rails] Re: Help convert code form PHP to Rails.

2009-02-04 Thread Shankar Ganesh
Hi Julian, Here is what the code I tried <% result=[]%> <%date=[] %> ## An array from database with select all query <% @eventall.each do |test| %> <%i1= test.when%> <%i2 =test.to%> <%i3=i1.to_s.gsub('-','') %> <%i4=i2.to_s.gsub('-','')%> <%span =i3..i4%>

[Rails] Re: Adding "id='xyz' " to a form_tag

2009-02-04 Thread srj
I just added the extra braces back in so I could see the error again, but now it does not complain - I must have had something extra or something missing. So I guess it works both ways. On Feb 4, 11:21 pm, Shankar Ganesh wrote: > Steve can you tell me when you are getting error and what error?

[Rails] pagination problem using will_paginate with two models

2009-02-04 Thread srikanth
Hi, let me explain my application details: I have two controllers: 1.streams_controller 2.search_controller And i have two models: 1.stream.rb 2.search.rb in streams_controller, i am uploading and downloading streams in search controller i am searching the streams from database. Here i have u

[Rails] Re: Adding "id='xyz' " to a form_tag

2009-02-04 Thread Shankar Ganesh
Steve can you tell me when you are getting error and what error? -- 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 ema

[Rails] Re: Adding "id='xyz' " to a form_tag

2009-02-04 Thread srj
Thanks everyone for all the help . . . When I tried it like this, I got a compile error: <% form_tag ( {:controller => 'my_controller', :action => 'my_action' }, {:id => 'xyz'}) do %> When I removed the second set of braces { }, like this, it works!!! <% form_tag ( {:controller => 'my_control

[Rails] Re: Adding "id='xyz' " to a form_tag

2009-02-04 Thread Julian Leviston
That's not true. Ids are perfectly valid. Blog: http://random8.zenunit.com/ Learn rails: http://sensei.zenunit.com/ On 05/02/2009, at 3:01 PM, Phlip wrote: > >>I am using the form_tag_helper to create a form, but I want to >> give it >>an ID so I can style the elements within the for

[Rails] Re: Adding "id='xyz' " to a form_tag

2009-02-04 Thread Shankar Ganesh
Steve, Have you tried this url(http://blog.invisible.ch/files/rails-reference-1.1.html#htmlforms . ) ? shankar. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Ra

[Rails] Re: Adding "id='xyz' " to a form_tag

2009-02-04 Thread Julian Leviston
That won't work. Blog: http://random8.zenunit.com/ Learn rails: http://sensei.zenunit.com/ On 05/02/2009, at 3:00 PM, Shankar Ganesh wrote: > > Hi Steve! > > Try this <%= form_tag :action => 'my_action', :id =>'xyz' %> and > I think this manual will be helpful to > you.http://blog.invisi

[Rails] Re: Help convert code form PHP to Rails.

2009-02-04 Thread Julian Leviston
Time to learn more rails and ruby my friend. We're not going to write your code for you. Have an attempt and then ask questions about that in a succinct and clear manner. Blog: http://random8.zenunit.com/ Learn rails: http://sensei.zenunit.com/ On 05/02/2009, at 2:09 PM, Shankar Ganesh wrot

[Rails] Re: Adding "id='xyz' " to a form_tag

2009-02-04 Thread Julian Leviston
Look at the Api. You need to supply two hashed rather than one. The second has HTML options. The first is the URL Blog: http://random8.zenunit.com/ Learn rails: http://sensei.zenunit.com/ On 05/02/2009, at 2:49 PM, srj wrote: > > I am using the form_tag_helper to create a form, but I want to

[Rails] Re: Adding "id='xyz' " to a form_tag

2009-02-04 Thread srj
I did try with class= instead of id=, but I get the exact same result On Feb 4, 11:01 pm, Phlip wrote: > >     I am using the form_tag_helper to create a form, but I want to give it > >     an ID so I can style the elements within the form.  I currently have > >     the following: > > Style thin

[Rails] Re: Adding "id='xyz' " to a form_tag

2009-02-04 Thread Phlip
> I am using the form_tag_helper to create a form, but I want to give it > an ID so I can style the elements within the form. I currently have > the following: Style things with classes unless you must use IDs. I can't think of a reason. Rails is so flexible that, before you know it

[Rails] Re: Adding "id='xyz' " to a form_tag

2009-02-04 Thread Shankar Ganesh
Hi Steve! Try this <%= form_tag :action => 'my_action', :id =>'xyz' %> and I think this manual will be helpful to you.http://blog.invisible.ch/files/rails-reference-1.1.html#htmlforms . enjoy ! have a great day. cheers, shankar. -- Posted via http://www.ruby-forum.com/. --~--~-

[Rails] Re: Adding "id='xyz' " to a form_tag

2009-02-04 Thread CFC
<% form_tag {:controller => "..."}, {:id => "xyz"} %> Try it? On Thu, Feb 5, 2009 at 11:49 AM, srj wrote: > > I am using the form_tag_helper to create a form, but I want to give it > an ID so I can style the elements within the form. I currently have > the following: > ><% form_tag :con

[Rails] Adding "id='xyz' " to a form_tag

2009-02-04 Thread srj
I am using the form_tag_helper to create a form, but I want to give it an ID so I can style the elements within the form. I currently have the following: <% form_tag :controller => 'my_controller', :action => 'my_action' do %> <% end %> I tried this: <% form_

[Rails] Re: small doubt HELP me

2009-02-04 Thread Shankar Ganesh
Hi all, My apologies for posting a small amount of data, there was some mistake in posting this post.You can see the full post of the forum here http://www.ruby-forum.com/topic/177617#777504. Thanks for all your response. Cheers, Shankar. -- Posted via http://www.ruby-forum.com/. --~--

[Rails] Help convert code form PHP to Rails.

2009-02-04 Thread Shankar Ganesh
hi, Shown below is the PHP code to obtain the value for each date in the corresponding date range.And with I've attached the MYSQL Database Table.Please Have a look.I've tried to convert this code to rails but not yet succeeded.Please let me know if you can do $value) { $group[$key].=$

[Rails] Re: Tag clouds

2009-02-04 Thread Bob Martens
I guess in order to help you, we'd need to know what you have tried so far. For me, it was as simple as going to the GitHub repository and following the instructions they give when clicking on the little ruby. What have you tried? On Feb 4, 7:51 am, Vivek wrote: > Moreover, Even if I want to in

[Rails] Re: A noob question for direction

2009-02-04 Thread Bob Martens
Enjoy it is a good point, and a good launchpad into more reading and more testing. On Feb 4, 11:55 am, John Dean wrote: > Thanks guys - just got > thehttp://www.pragprog.com/titles/rails3/agile-web-development-with-rail... > one v3. > > Will read! > -- > Posted viahttp://www.ruby-forum.com/. --

[Rails] Re: We don't need no stinking Badges! Guidance, anyone?

2009-02-04 Thread Harold
Why do you even need a UserBadge model? I would have User model, a Badge model, where the relationship is User belongs_to :badge, and badge has_many :users. Then you can simply assign it with some_user.badge = some_badge. It seems like you're adding complexity with the UserBadge model and the cu

[Rails] Values should be filled for corresponding date, in a range.

2009-02-04 Thread Shankar Ganesh
Hi , I'm newbie to Rails can someone help in this.I had struck here in my application and actually i solved it using PHP but don't know how to do in Rails. I have table like this --- |id | what | when | color |

[Rails] Ruby Vs. PHP pipe terminal access

2009-02-04 Thread Richard Schneeman
I'm attempting to make a javascript/RoR site that utilizes maxima the free math program. In this thread http://www.ruby-forum.com/topic/177232#777054 I was able to pass information into and out of maxima, but I wasn't able to retrieve the last line, and when running this code multiple times: max

[Rails] Re: Maxima and Ruby Integration

2009-02-04 Thread Richard Schneeman
Thanks for the help, but alas calling max.to_a results in an unrecoverable error as well. I will have to just skip unnecessary lines... -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Go

[Rails] Re: on new site

2009-02-04 Thread Daly
OK, so I have written part 1 of my deploying to EC2. It's at http://blog.developergurus.com/2009/02/04/rails-passenger-ubuntu-and-ec2-part-1/ I was going to write part 2 today, but don't think I will. Has to be on Saturday :) Please let me know if you want me to elaborate on anything in there. O

[Rails] Re: small doubt HELP me

2009-02-04 Thread Julian Leviston
He means the content of his SQL table represented as ASCII was as he had it. Blog: http://random8.zenunit.com/ Learn rails: http://sensei.zenunit.com/ On 05/02/2009, at 3:06 AM, Miguel Regedor wrote: > > What do you mean by "I have table like this"? is an ASCII table and > you want to pars

[Rails] Re: form_remote_tag

2009-02-04 Thread Julian Leviston
Do you mean a js alert? Blog: http://random8.zenunit.com/ Learn rails: http://sensei.zenunit.com/ On 05/02/2009, at 2:22 AM, Shandy Nantz wrote: > > I have this strange situation where I have a form and when you hit the > form button an indicator is supposed to flash at the bottom of the > scr

[Rails] drag and drop for a form

2009-02-04 Thread Me
I am trying to do a drag and drop cards into a shelf. I am doing this for the drop: <%= drop_receiving_element :slot2,{:onDrop => "function(element) { $('slot2').replace('' + element.id + '').addClassName('cardfill'); }"} %> This does not seem to be working. When I press submit, the id is not

[Rails] Re: A nicer way to join my hash?

2009-02-04 Thread Julian Leviston
Undefine methodcan be caught with rescue 'default' on the end. No biggie. Blog: http://random8.zenunit.com/ Learn rails: http://sensei.zenunit.com/ On 05/02/2009, at 4:14 AM, Joshua Abbott wrote: > > Julian, > > Have you done any benchmark testing on using the &: method? I would be > curious

[Rails] Re: How to deploy multiple apps on one Mac OSX development machine...

2009-02-04 Thread Julian Leviston
Choose a different port? LOL Blog: http://random8.zenunit.com/ Learn rails: http://sensei.zenunit.com/ On 05/02/2009, at 9:41 AM, LaughingNinja wrote: > > I have split off the User Authentication of our main application into > it’s own application. I would like have this called from the main

[Rails] Re: Large RoR systems design and implementation

2009-02-04 Thread Julian Leviston
The reasons you explained you wanted the layer made me think you only needed datamapper. Be simpler rather than complex. Explain again why you need the layer, please? Remember YAGNI. Blog: http://random8.zenunit.com/ Learn rails: http://sensei.zenunit.com/ On 05/02/2009, at 5:28 AM, sbrocher

[Rails] Re: how to create select box by selected value ?

2009-02-04 Thread Julian Leviston
No! Use intelligence! the entire select tag is replaced by collection select. Look on the API for syntax. Blog: http://random8.zenunit.com/ Learn rails: http://sensei.zenunit.com/ On 05/02/2009, at 4:42 AM, Nopp Deew wrote: > > Julian Leviston wrote: >> Use collection_select > > Program has

[Rails] Re: Custom module for ActionController no longer works in Rails 2.2

2009-02-04 Thread Julian Leviston
An error backtrace would be really helpful. Blog: http://random8.zenunit.com/ Learn rails: http://sensei.zenunit.com/ On 05/02/2009, at 4:40 AM, "bburr...@gmail.com" wrote: > > I am using some code for in place JS editing with validation, that > worked up until Rails 2.2. After upgrade, the

[Rails] Re: rail's compatibility problem

2009-02-04 Thread Julian Leviston
Is it because you have jruby AND ruby? Therefore also two gems? Blog: http://random8.zenunit.com/ Learn rails: http://sensei.zenunit.com/ On 05/02/2009, at 8:18 AM, Jack Wu wrote: > > Hello: > I did 'Jruby script/generate controller home index', and I got "Rails > requires RubyGems >= 1.3.1

[Rails] Re: controllers/views in sub-folders and broken routes

2009-02-04 Thread Julian Leviston
No, but putting admin_ in front of your admin controllers is fine. Blog: http://random8.zenunit.com/ Learn rails: http://sensei.zenunit.com/ On 05/02/2009, at 7:32 AM, Greg Donald wrote: > > On Tue, Feb 3, 2009 at 5:59 PM, Julian Leviston > wrote: >> Anyway, what OTHER routes do you have in f

[Rails] Re: Rails 2.2.2 to_date and to_datetime methods

2009-02-04 Thread Julian Leviston
Basic oop. Classes have class methods, instances hve instance methods. Makes sense if you understand what a class is. Animal is a class. If you want to create an instance, you say Animal.new. That gives you an animal object which is not the class. It would have been better if they'd called

[Rails] Re: We don't need no stinking Badges! Guidance, anyone?

2009-02-04 Thread Julian Leviston
Could you explain your problem more clearly? The rest was beautiful. Blog: http://random8.zenunit.com/ Learn rails: http://sensei.zenunit.com/ On 05/02/2009, at 6:37 AM, Lake Denman wrote: > > Hi, Thanks for taking a look at this. I am in need of some guidance > for > a particular problem: >

[Rails] Re: How to deploy multiple apps on one Mac OSX development machine...

2009-02-04 Thread LaughingNinja
Thanks. That was easy :) On Feb 4, 2:44 pm, Nginx Lova wrote: > you can use ./script/server -p 4000 > > LaughingNinja wrote: > > I have split off the User Authentication of our main application into > > it s own application. I would like have this called from the main > > application. How can I

[Rails] Rails Music Composer Beta Launch.

2009-02-04 Thread GabrielG1976
Hello Everyone, I have just Launched Live a new online music composing site. That allows you to create new musical compositions based off the Conversion of text into a midi Composition that can be used in any software sequencer such as Reason 4 or GarageBand

[Rails] Which Association?

2009-02-04 Thread George Bray
I have a number of models and each has a Status. I want to have a single Status table to contain all statuses for all models. I'd prefer not to have intermediary join tables for each model. Lecturn.status_id -> Status.id Capturer.status_id -> Status.id Recording.status_id -> Status.id etc Is

[Rails] Concatenate (+) Named scopes leads to creation of an Array, is there a way to have stipp a Scope?

2009-02-04 Thread Gabriele Tassoni
Hi, I try to explain better, I wrote a named scope like that: named_scope :with_cellphones_or_emails, {:include => [:cellphones, :emails], :conditions => ["(cellphones.active = ? AND cellphones.customer_id = customers.id) OR (emails.active = ? AND emails.customer_id = customers.id)", true, true]}

[Rails] Re: MySQL Schema Error

2009-02-04 Thread Brian Jensen
And still a problem today wih rails 2.2.2... Arun Gupta wrote: > Still facing the issue with MySQL 6.0 and Rails 2.1.2, filed: > http://bugs.mysql.com/bug.php?id=42193. > > -Arun > > Derder Ga wrote: >> Afrasyab Bashir wrote: >>> Just to add, sadly enough the solution I wrote was true only f

[Rails] Re: HowTo install plugins from github?

2009-02-04 Thread Jason Roelofs
And the problem is? I mean, script/plugin install git... works exactly as expected, if you have git installed and it works like it should. Please state what problem you're having instead of just blatantly bashing something that works for 99% of the people who try to use it. Jason On Wed, Feb 4,

[Rails] Re: How to deploy multiple apps on one Mac OSX development machine...

2009-02-04 Thread Nginx Lova
you can use ./script/server -p 4000 LaughingNinja wrote: > I have split off the User Authentication of our main application into > it�s own application. I would like have this called from the main > application. How can I have multiple instances of �script/server� > running when there�s only one

[Rails] Re: ar_mailer and missing template in production environment

2009-02-04 Thread LaughingNinja
I'm having the same problem. It's also affecting using the normal ActionMailer. I found a few interesting links: http://www.ruby-forum.com/topic/158954 http://developer.apple.com/DOCUMENTATION/DARWIN/Reference/ManPages/man1/postfix.1.html I would be interested in any solutions. Gary. On Feb 3,

[Rails] How to deploy multiple apps on one Mac OSX development machine...

2009-02-04 Thread LaughingNinja
I have split off the User Authentication of our main application into it’s own application. I would like have this called from the main application. How can I have multiple instances of “script/server” running when there’s only one localhost:3000? I believe I can then simple switch applications b

[Rails] Re: A nicer way to join my hash?

2009-02-04 Thread s.ross
On Feb 4, 2009, at 9:14 AM, Joshua Abbott wrote: > Have you done any benchmark testing on using the &: method? I would be > curious as to why you say it's slower. PMFJI... As I recall, the &:foo notation is a shortcut for Symbol#to_proc so the following code snippets are the same: def frazzle

[Rails] rendering error page for "Unauthorized" from before_filter

2009-02-04 Thread balint . erdi
Hey all, I am writing a plugin in which I want to stop the rendering of an action with an unauthorized response if the user is not authorized to view the resource. I am using a before filter to achieve this and inside that before filter I do it like so: render :text => "Unauthorized!", :stat

[Rails] Re: rail's compatibility problem

2009-02-04 Thread Frederick Cheung
On 4 Feb 2009, at 21:18, Jack Wu wrote: > > Hello: > I did 'Jruby script/generate controller home index', and I got "Rails > requires RubyGems >= 1.3.1 (you have 1.2.0). Please 'gem update > --system' and try again" message. I follwed, and did 'gem update > --system', but it tells me there is no

[Rails] Re: Rails 2.2.2 to_date and to_datetime methods

2009-02-04 Thread James Byrne
Robert Walker wrote: > String has no class method "to_date" yet it does have a "to_date" > instance method. However, Ruby itself has neither a class nor instance > method named "to_date" for it's String class. > > The magic happens here: > http://www.railsbrain.com/api/rails-2.2.2/doc/index.ht

[Rails] Regexp route broken in Rails 2.2.2?

2009-02-04 Thread Ed W
Hi, just upgraded an app from Rails 2.1.0 to 2.2.2 and finding my routes stopped working URL which doesn't match is: http://blah/blog/auth/login Route is: map.connect 'blog/:controller/:action/:id', :requirements => {:controller => /(auth|asdf)/} In fact, neither does this match: map.connect

[Rails] rail's compatibility problem

2009-02-04 Thread Jack Wu
Hello: I did 'Jruby script/generate controller home index', and I got "Rails requires RubyGems >= 1.3.1 (you have 1.2.0). Please 'gem update --system' and try again" message. I follwed, and did 'gem update --system', but it tells me there is nothing to update. My rails version is 2.2.2, I tried to

[Rails] Re: Custom module for ActionController no longer works in Rails 2.2

2009-02-04 Thread bburr...@gmail.com
That did the trick. Thanks Fred!! Brian Burridge Agile Nomads www.rubyrailsreview.com On Feb 4, 12:46 pm, Frederick Cheung wrote: > On 4 Feb 2009, at 17:40, bburr...@gmail.com wrote: > > > > > I am using some code for in place JS editing with validation, that > > worked up until Rails 2.2. Afte

[Rails] Re: Rails 2.2.2 to_date and to_datetime methods

2009-02-04 Thread Robert Walker
By the way it is possible to add methods to instances of objects in Ruby. Although that is not what's being done in your case. Rails is simply extending the Ruby String class to add the method to all instances of String. Here is a nice blog about singleton methods in case you want to know mor

[Rails] Re: Rails 2.2.2 to_date and to_datetime methods

2009-02-04 Thread Robert Walker
James Byrne wrote: > In the console I see this behaviour: > > >>> "1927041200".to_date.methods > => ["ns?", "mon", "ago", "end_of_month", "months_since", > "default_inspect", "minus_without_duration", ... >>> "1927041200".to_date.class > => Date >>> "1927041200".class > => String >>>

[Rails] Re: controllers/views in sub-folders and broken routes

2009-02-04 Thread Greg Donald
On Tue, Feb 3, 2009 at 5:59 PM, Julian Leviston wrote: > Anyway, what OTHER routes do you have in front of the default route? > Coz when you're using namespaces controllers, it matters. Aside from > this, DHH has made it pretty clear this isn't a great thing to do. Having a single admin control

[Rails] DangerousAttributeError

2009-02-04 Thread Jorg Lueke
Is there something one can do in the model to override ActiveREcord when legacy tables have names that are defined in rails generating teh DangerousAttributeError? Or am I stuck creating a view to get arund this situation? --~--~-~--~~~---~--~~ You received this me

[Rails] Rails 2.2.2 to_date and to_datetime methods

2009-02-04 Thread James Byrne
In the console I see this behaviour: >> "1927041200".to_date.methods => ["ns?", "mon", "ago", "end_of_month", "months_since", "default_inspect", "minus_without_duration", ... >> "1927041200".to_date.class => Date >> "1927041200".class => String >> String.to_date.methods NoMethodError

[Rails] Re: HowTo install plugins from github?

2009-02-04 Thread Rudy
My experience was even worse. That worse that I started to dislike git a lot. RoR is about keeping things simple and clear: now we have and http, and svn, AND git for installing plugins, and some of it works sometimes, but not always, and you need to install something else first, etc. NOT a good e

[Rails] jQuery's fancyZoom and delayedObserver conflict.

2009-02-04 Thread Marcelo de Moraes Serpa
Hello list, I know this is more client-side stuff since I'm using Rails js helpers, I thought I would be posting here. http://pastie.org/379754 -- the delayedObserver simply doesn't work when fancyZoom is activated (it simply fails silently). If I remove the fancyZoom related code, it works ok. He

[Rails] subdomain_fu rewriting wrong with tld size 2 ?

2009-02-04 Thread Matt Patterson
I have a website on a demo server at: mycompany.com I have a Rails app with subdomain_fu. I've verified it's running in the right environment and set the TLD Size to "2" so I can have: myapp.mycompany.com admin.myapp.mycompany.com *.myapp.mycompany.com (for users' customized landing pages) This

[Rails] We don't need no stinking Badges! Guidance, anyone?

2009-02-04 Thread Lake Denman
Hi, Thanks for taking a look at this. I am in need of some guidance for a particular problem: My Requirements: The concept of a user The concept of a badge A badge is simply a small image over the user's avatar that displays extra information about the user. An admin user will be able to assign

[Rails] ruby-prof's memory profiling Vs. my app

2009-02-04 Thread Pete Higgins
I've been using ruby-prof's memory profiling mode to try to reduce the memory usage of an app, with ruby enterprise edition and rails 2.2.2. I setup a profiling test (as recommended in the ruby-prof docs) for a single action, and after my refactoring ruby-prof said I had cut memory usage by 1/3 an

[Rails] Re: Need your advice - after Locomotive and MAMP

2009-02-04 Thread Rudy
Hi Alan, just to let you and others know: the culprit was the widgetsfolder in the vendor plugin folder. After removing that everything was fine again. Don't know why, but I SURE will not use this tabnav or widget thing again - certainly not as long as it stays available only through git. I don't

[Rails] Re: Large RoR systems design and implementation

2009-02-04 Thread Maurício Linhares
A good starting point is read Eric Evan's "Domain Driven Design", you will probably learn a lot about how to organize big systems in any language. The book is easy to read and has examples in Java. - Maurício Linhares http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en) O

[Rails] Re: Large RoR systems design and implementation

2009-02-04 Thread Kim Shrier
Hello Seb, An approach that I have used is to place the higher level business logic in model objects that do not inherit from ActiveRecord. In the way I think about larger systems, the higher level business logic is still part of the model. The model is not limited to managing the persistence o

[Rails] Re: Large RoR systems design and implementation

2009-02-04 Thread sbrocher
Hi Julian, Thanks for your answer. I've seen Datamapper before. However, the way I understand it, Datamapper is pretty much just a replacement for ActiveRecord, so I don't see how it would add the extra layer of abstraction I'm searching for... Did I miss something here? Thanks Seb On Feb 3, 9:

[Rails] Re: concat, nil.<< and Rails 2.3.0RC1

2009-02-04 Thread Rob Biedenharn
On Feb 4, 2009, at 12:33 PM, Joost wrote: > Hmm.. might be something that / .. > It comes from deprecated Globalize (v1) that uses the "blabla %s > blabla" / 'something' to translate strings.. > > Any other ideas? OK, so Globalize defines a String#/ is it possible that it is not finding a tran

[Rails] Re: A noob question for direction

2009-02-04 Thread John Dean
Thanks guys - just got the http://www.pragprog.com/titles/rails3/agile-web-development-with-rails-third-edition one v3. Will read! -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Googl

[Rails] Re: Custom module for ActionController no longer works in Rails 2.2

2009-02-04 Thread Frederick Cheung
On 4 Feb 2009, at 17:40, bburr...@gmail.com wrote: > > I am using some code for in place JS editing with validation, that > worked up until Rails 2.2. After upgrade, the method can't be find, so > apparently its not overridge the right class or isn't being included > as before. It is currently

[Rails] 2nd call for papers: PostgreSQL Conference East

2009-02-04 Thread Joshua D. Drake
PostgreSQL Conference East is being held at historic Drexel University on April 3rd through 5th 2009 . This is the second call for papers. The call for papers ends Feb 23rd and speakers will be notified on the 27th. You may submit your talk here: http://www.postgresqlconference.org . We are lookin

[Rails] Re: how to create select box by selected value ?

2009-02-04 Thread Nopp Deew
Julian Leviston wrote: > Use collection_select Program has been error >> wrong number of arguments (4 for 5) error on line 28 27: 28: <%= collection_select @areas, :id, :name, (shift.area_id if shift) %> 29: -- Posted via http://www.ruby-forum.com/. --~--~

[Rails] Custom module for ActionController no longer works in Rails 2.2

2009-02-04 Thread bburr...@gmail.com
I am using some code for in place JS editing with validation, that worked up until Rails 2.2. After upgrade, the method can't be find, so apparently its not overridge the right class or isn't being included as before. It is currently being included via a require statement in environment.rb. The c

[Rails] Re: protect to_xml and/or disabled other format

2009-02-04 Thread fmh
yes it's this. thanks On 3 fév, 21:37, jemminger wrote: > one way would be a before_filter, e.g. > > class ApplicationController < ActionController::Base > >   before_filter :trap_xml > >   def trap_xml >     if params[:format] == 'xml' && params[:action] != 'my_xml_action' >       redirect_to :

[Rails] Re: ROXML from_xml not returning an object instance...

2009-02-04 Thread Ben Woosley
Hey Adam, I'll take a look at this later today and get back to you. I specifically haven't tested intermixing ROXMl and ActiveRecord (as you have with :waypoints). I suspect the problem is that I'm setting the instance variable rather than going through the proxy accessor. I'll post here a

[Rails] Re: concat, nil.<< and Rails 2.3.0RC1

2009-02-04 Thread Joost
Hmm.. might be something that / .. It comes from deprecated Globalize (v1) that uses the "blabla %s blabla" / 'something' to translate strings.. Any other ideas? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby

[Rails] Rich editor.

2009-02-04 Thread GA Gorter
I have a script with a tinymce editor included. But the editor doesn't work at all. Can somebody explain what is wrong. In the application_helper def in_place_rich_editor(field_id, options = {}) function = "new Ajax.InPlaceRichEditor(" function << "'#{field_id}', " f

[Rails] Re: A nicer way to join my hash?

2009-02-04 Thread Joshua Abbott
Julian, Have you done any benchmark testing on using the &: method? I would be curious as to why you say it's slower. As for uglier - I think that's a personal preference. I personally would never recommend chaining 3 methods together as you did for fear that one would fail causing the infamo

[Rails] ActionController::Caching::Sweeper not autoloading in 2.3.0 RC1

2009-02-04 Thread Wincent Colaiuta
Just updated to 2.3.0 RC1 and I'm finding that my sweepers are throwing NameErrors (uninitialized constant ActionController::Caching::Sweeper) when evaluation reaches lines like this one: class PostSweeper < ActionController::Caching::Sweeper This only happens in the development environment, b

[Rails] Re: PHP string + value to RoR

2009-02-04 Thread Robert Walker
Robert Walker wrote: > The value is <%= h(value) %> Oops! Previous post was a bad example. Assume value was taken from user input, which in that case you should escape it to make it safe. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You receiv

[Rails] Re: PHP string + value to RoR

2009-02-04 Thread Robert Walker
Ryan Bigg wrote: > <% value = 1 %> > The value is <%= value %> or <% value = 1 %> The value is <%= h(value) %> In case you don't trust the "value" of value. The h (http_escape) method will help protect you against injection attacks. -- Posted via http://www.ruby-forum.com/. --~--~-~--

  1   2   >