[Rails] Re: collect issue

2008-12-03 Thread Frederick Cheung
On Dec 3, 7:37 am, Petan Cert [EMAIL PROTECTED] wrote: Hi all, I am filtering products specs = Product.find(:all, :conditions = [ ], :order = ...) @products = specs.collect { |spec| spec. } And I would like to collect all of the product fields. I dont know what to use instead

[Rails] Re: Authenticity Token change under 2.2.2?

2008-12-03 Thread Frederick Cheung
On Dec 3, 6:18 am, Simon Macneall [EMAIL PROTECTED] wrote: Hi Fred, No, the authenticity_token isn't getting through at all, and I accept that   the code probably should have never worked as it stands. That said, I   can't for the life of me figure out how to get the auth token to be  

[Rails] Re: MySQL Adapter on Rails 2.2

2008-12-03 Thread Frederick Cheung
On Dec 3, 2:20 am, Rick [EMAIL PROTECTED] wrote: Hey Joshua and Fred, I agree with the general statement that installing the mysql gem has gotten harder.  In fact, the only way I've been able to do it is by pulling in the mysql-ruby source from tmtm.org, modifying the extconf.rb file, and

[Rails] Re: MySQL Adapter on Rails 2.2

2008-12-03 Thread Rick
Fred, I'll give 1.8.6 a try and let you know what happens, 1.8.6p114 is what ships on the Mac. Rick On Dec 2, 11:24 pm, Frederick Cheung [EMAIL PROTECTED] wrote: On Dec 3, 2:20 am, Rick [EMAIL PROTECTED] wrote: Hey Joshua and Fred, I agree with the general statement that installing the

[Rails] Re: what's the smallest device to do Rails development on???

2008-12-03 Thread Frederick Cheung
On Dec 3, 6:49 am, Greg Hauptmann [EMAIL PROTECTED] wrote: Hi, What's the smallest (lightest / most compact) device that one could use to do relatively productive Rails development on?  Ideally something you could carry in your pocket (i.e. I'm thinking smaller/lighter than a MacBook).  

[Rails] Re: The Forum Hunt continues...

2008-12-03 Thread Jeffrey Lim
Fernando Perez wrote: There is 'altered beast' which is based of the no longer maintained 'best' forum app. speaking of which.. so is there an alternative to beast or altered beast right now? I tried altered just recently - but didnt go away with such a good impression. -- Posted via

[Rails] undefined method `include?'

2008-12-03 Thread Patrick L.
Hi guys, I was just working on this application (http://pastie.org/329613) when I added this line session[:user].include?(params[:id]) to an unless statement and the app threw this error: NoMethodError in SignupsController#show undefined method `include?' for 27:Fixnum Application Trace:

[Rails] Re: Can I export db data to fixtures?

2008-12-03 Thread Arthur Chan
Bobnation wrote: I'm curious as to what you are using this for. On Dec 2, 1:00�am, Arthur Chan [EMAIL PROTECTED] It is difficult to handle the data with relationships between different tables. So, it is better to start the creation of fixtures from using existing data. Also, it is useful

[Rails] Re: Can I export db data to fixtures?

2008-12-03 Thread Arthur Chan
I just modified the plugin (the ar_fixtures.rake file) to allow output all tables: code # arthur: if rake db:data:dump MODEL=ALL then load the following models # put all your tables need to export here all_modelsS = ['Album', 'Asset',... 'UserContact', 'UserInfo', 'User'] def

[Rails] How to test a plugin

2008-12-03 Thread Arthur Chan
Guys, I've created a plugin, i wanna put my automated test there. However, I got bad file descriptor error when i run the test like normal unit test file: ruby plugins/acts_as_fox/test/acts_as_fox_test.rb How to test a plugin? Also, is it right to say that I should only put my unit tests (but

[Rails] Thin web server

2008-12-03 Thread Karthi kn
Hi, Today only I came to know about 'thin' web server. I have installed the gem and used it. But I don't know whether 'thin' web server is better than webrick or mongrel. If so, can you please compare these web servers? Thanks in advance... -- Posted via http://www.ruby-forum.com/.

[Rails] event target bug or jquery.validation bug in IE?

2008-12-03 Thread Arthur Chan
I'm using jquery.validation.js plugin. It works fine in firefox. However, in IE, I have problem if there is errorred fields (which shows an error sentence). If it happens, the plugin keep onfocusin the first errored field (i use the event object to find out the problem). It should be logically

[Rails] how to implement the tags using acts_as_taggable_on_steroids

2008-12-03 Thread srikanth
Here is the my application details: work environment:windows instantrails2.0 1.i have created a controller and a model for 'aticle' and 'announcements'. 2.i added acts_as_taggable in both the models(i.e article.rb and announcement.rb) 3.i created a migration for tag support like

[Rails] Re: MySQL Adapter on Rails 2.2

2008-12-03 Thread Frederick Cheung
On Dec 3, 9:23 am, Rick [EMAIL PROTECTED] wrote: Well, that didn't seem to go too well.  It seems that somewhere in the mkmf / extconf.rb soup the actual location of the mysql home has gotten lost.  The only way this will work is if mysql is installed in / usr/local, the default for the

[Rails] Re: MySQL Adapter on Rails 2.2

2008-12-03 Thread Rick
So what little genie whispered that magic into your ear? Thanks for passing it on though. I don't want to say how long I spent puzzling through the mkmf / extconf code trying to figure how to pass that sucker in. Is this a general RoR convention or what? Rick On Dec 3, 12:25 am, Frederick

[Rails] Re: To store the combo box id value from one table another table in database+rails

2008-12-03 Thread balaji rajagopal
Hi *Frederick Cheung* use one controller+five tables+one detailed form( it includes five form or page).First page enter the data and click next button(get the data using session) and final to click save button to store all data to corresponding table. Please give an example code Please give

[Rails] Re: how to implement the tags using acts_as_taggable_on_steroids

2008-12-03 Thread Thorsten Müller
hi srikanth, I just checked this against my implementation of the same plugin. As far as I can see, you did everything right. The plugin is loading, otherwise the acts_as_taggable in the model would give you an error. Only difference: I used: @article.tag_list = xxx instead of tag_with, which

[Rails] Re: how to implement the tags using acts_as_taggable_on_steroids

2008-12-03 Thread sreekanth . G
hi Thorsten, thanks for ur reply. Yeah u r right.i have found that tag_with is not working . suppose i want to find the data from articles and announcements using tag how can i do that. article table is having fields: name:string body:string announcements table having fields: body: am able

[Rails] Re: how to implement the tags using acts_as_taggable_on_steroids

2008-12-03 Thread Thorsten Müller
We didn't use too much of the find functions, since we used sphinx full text search on the database and just included the tags in the sphinx index. the basic function to get articles with given tags: @article = Article.find_tagged_with(something) This takes a few options: Pass either a tag,

[Rails] Re: how to implement the tags using acts_as_taggable_on_steroids

2008-12-03 Thread sreekanth . G
hi, that commond is working on console,but i want give the tag name from html and it should take the tag paramaer and able to list out the tags which r linking to article and announcements.For this w need to update the controller of article and announcements and at the same time we need to

[Rails] Re: Multiple Forms and Multiple tables +One Model +One Controller

2008-12-03 Thread balaji rajagopal
Hi Im using Multiple Forms and Multiple tables +One Model +One Controller in my rails application I have 5 forms(5 stages) to create my rails application. 1st form: to enter the data and click the next button.To get the values in session. 2nd form: to enter the data and click the next button.To

[Rails] Re: adding sound to Rails app

2008-12-03 Thread Peter De Berdt
On 02 Dec 2008, at 22:04, Bill Walton wrote: Thanks. I found that a bit after my initial plea and grabbed sound.js. I'm having a really wierd problem with it though. I call Sound.play(good_sound) or Sound.play(bad_sound) depending on whether or not an item is found. First time it

[Rails] Re: What you think about Ruby Jobs?

2008-12-03 Thread Edson Lopes
Thanks for the answers! Well, the way i see here in Brazil, is that there are two types of bubbles. 1º one on freelancers and standalone services (In here, RoR is getting better and better every day...) but the 2º, the companies, are not adopting this technology so well, and that is what really

[Rails] Re: mysql warning

2008-12-03 Thread Peter De Berdt
On 03 Dec 2008, at 06:19, Nilesh Kumar wrote: In development.log one message always appears as WARNING: You're using the Ruby-based MySQL library that ships with Rails. This library is not suited for production. Please install the C-based MySQL library instead (gem install mysql).

[Rails] Re: Authenticity Token change under 2.2.2?

2008-12-03 Thread Simon Macneall
Excellent, works like a charm, thanks for that. Simon On Wed, 03 Dec 2008 17:13:50 +0900, Frederick Cheung [EMAIL PROTECTED] wrote: Well (I had to look this up since I never use raw XMLHttpRequest) the parameter to send is the body of the request. When rails gets a text/ plain request

[Rails] Re: Multiple Forms and Multiple tables +One Model +One Controller

2008-12-03 Thread Thorsten Müller
I do not really understand, what you are doing here, but: You are using else if without a condition several times, beneath the fact that the correct ruby syntax is elsif Then Ruby would interpret the following line: @stage = params[:stage].to_i as condition and the outcome of this is most

[Rails] Re: how to implement the tags using acts_as_taggable_on_steroids

2008-12-03 Thread Thorsten Müller
On the first view you will need a form to enter the search like: % form_tag(search_articles_path(), :method = :get) do % %= label(:search, :tag, Search:) %br / input name=search id=tag type=text size=17 value='%= session[:search_keys] %' style=width:123px; / input type=image id=bt_zoek

[Rails] image text link instead of image_for help!

2008-12-03 Thread denver
Hi Guys, I am using attatchment_fu to adding images to my rails app, and have the following %= article_image_for(@article) % which displays the image for my article.. however i just want a text link to the image instead of the image itself... can this be done with a link_to? or an a [EMAIL

[Rails] Re: how to implement the tags using acts_as_taggable_on_steroids

2008-12-03 Thread sreekanth . G
hi, from the above code, what i understud is search is a method and it shold be defined in the controller right like def search @articles = Article.find_tagged_with(params[:search]) end or how it will be exactly can u help me regarding this thanks . and to enter tag as search parameter on first

[Rails] Re: mysql warning

2008-12-03 Thread Nilesh Kumar
Hi Peter. I am using XP OS and MySql server version is 5.0.41. Ruby's version: 1.8.6 and Rails version: 2.2.2 On Wed, Dec 3, 2008 at 4:31 PM, Peter De Berdt [EMAIL PROTECTED]wrote: On 03 Dec 2008, at 06:19, Nilesh Kumar wrote: In development.log one message always appears as * WARNING:

[Rails] Re: adding sound to Rails app

2008-12-03 Thread Nellboy
no problem Bill... The solution is just to keep playing with it, and recoding it in different ways until it works... if my suggestion helped, then I think it probably has got something to do with the way the Sound.play function is executing... from what you say, i suspect that it's not clearing

[Rails] Re: adding sound to Rails app

2008-12-03 Thread Nellboy
actually, on second thoughts, Peter's solution looks much better On Dec 3, 12:04 pm, Nellboy [EMAIL PROTECTED] wrote: no problem Bill... The solution is just to keep playing with it, and recoding it in different ways until it works...  if my suggestion helped, then I think it probably has got

[Rails] Re: how to implement the tags using acts_as_taggable_on_steroids

2008-12-03 Thread sreekanth . G
hi , sorry for disturbing u . can u explain wat that code u have given will do, i added that coode in index.html.erb but im gettin unintialized method error:it is expected because the method i did not added in controller so can u give dea where can i modify the code search_articles_path(),

[Rails] Re: The Forum Hunt continues...

2008-12-03 Thread Ryan Bigg
There is my project called rboard http://github.com/radar/rboard compatible with latest rails and supports internationalisation On 03/12/2008, at 19:30, Jeffrey Lim [EMAIL PROTECTED] s.net wrote: Fernando Perez wrote: There is 'altered beast' which is based of the no longer maintained

[Rails] Re: how to implement the tags using acts_as_taggable_on_steroids

2008-12-03 Thread Thorsten Müller
search_articles_path would be generated by RESTful routing like (in routes.rb): map.resources :articles, :colection = [:search] but you can use any other path helper instead or a string with the url --~--~-~--~~~---~--~~ You received this message because you are

[Rails] Re: The Forum Hunt continues...

2008-12-03 Thread sreekanth . G
hi radar how to use tags using acts_as_taggable_on_steroids? can u give any sample application if u know On Wed, Dec 3, 2008 at 6:14 PM, Ryan Bigg [EMAIL PROTECTED] wrote: There is my project called rboard http://github.com/radar/rboard compatible with latest rails and supports

[Rails] Re: how to implement the tags using acts_as_taggable_on_steroids

2008-12-03 Thread Thorsten Müller
1):method = :get the above method shoud be defined in controller right. no, the :method = :get relates to form methods in html, nothing to do with methods in Rails if you defined the routes like map.resources :articles, :collection = [:search] and use the path helper search_articles_path, then

[Rails] Problems with link_to and submit_tag

2008-12-03 Thread Nellboy
ok, so here's my problem... i'll add the code below... I want to display users, and as an administrator, give other users administrative priviledges... so, I would perform this in the users index page... displaying all users and adding a checkbox next to each one to give administrative

[Rails] Re: Sending mail templates to a mailinglist

2008-12-03 Thread Dave Smith
Frederick Cheung wrote: On 2 Dec 2008, at 13:26, Dave Smith wrote: Fred button_to :send_mail, :id = some_template.id, :mailing_list_id = end mailings (database table shown below). @mail_template = MailTemplate.find(params[:id]) @mailing_list =

[Rails] map block issue on rails 2.2

2008-12-03 Thread Hasham
I am trying to change attribute of all objects in AR collection inside a map block see: http://pastie.org/329737 but attributes are not being updated in Rails 2.2 This was working in earlier versions of rails Any help is appreciated --~--~-~--~~~---~--~~ You

[Rails] Re: Sending mail templates to a mailinglist

2008-12-03 Thread Frederick Cheung
On Dec 3, 1:07 pm, Dave Smith [EMAIL PROTECTED] wrote: one final question.. i have the code working, and can send a mail template to a list of mailings... but in order to send more than one mailtemplate to these users i have had to create a button for each template as shown below.. % for

[Rails] Re: Problems with link_to and submit_tag

2008-12-03 Thread Thorsten Müller
the problem is more likely in the controller, so please post that code Is the right method called? You can see that in the development.log file There you can see too, if the params are posted correct --~--~-~--~~~---~--~~ You received this message because you are

[Rails] Re: how to implement the tags using acts_as_taggable_on_steroids

2008-12-03 Thread sreekanth . G
hi, You mean to say i need to add 1)map.resources :articles, :collection = [:search] in route.rb 2)do i need to add method in controller like def get - end 3)Can we give the tag parameter as text box entry from the forms(index.html.erb) and that tag parameter can be searched in the

[Rails] Re: Needs some help with eager loading issue on a has_many through relationship

2008-12-03 Thread Frederick Cheung
On Dec 2, 10:45 pm, hoenth [EMAIL PROTECTED] wrote: Any idea why Rails seems to be ignoring the :include? It's not - that's the way it does includes now, one select per association type (unless it has to fallback to the old joins based code because conditions/order reference the included

[Rails] Re: Problems with link_to and submit_tag

2008-12-03 Thread sadeesh kumar
On Dec 3, 6:05 pm, Nellboy [EMAIL PROTECTED] wrote: ok, so here's my problem... i'll add the code below... I want to display users, and as an administrator, give other users administrative priviledges... so, I would perform this in the users index page... displaying all users and adding a

[Rails] Re: Sending mail templates to a mailinglist

2008-12-03 Thread Dave Smith
Frederick Cheung wrote: On Dec 3, 1:07�pm, Dave Smith [EMAIL PROTECTED] wrote: now this i know is poor programming and looks bad too.. is there a way i can just have one button that sends each of the mail templates to all the users in the list..? just call the action something like

[Rails] Re: Problems with link_to and submit_tag

2008-12-03 Thread Nellboy
Thanks Sadeesh so you're saying I should use something like: p%= submit_tag 'Save' :action = update %/p On Dec 3, 1:26 pm, sadeesh kumar [EMAIL PROTECTED] wrote: On Dec 3, 6:05 pm, Nellboy [EMAIL PROTECTED] wrote: ok, so here's my problem... i'll add the code below... I want to display

[Rails] Re: Problems with link_to and submit_tag

2008-12-03 Thread sadeesh kumar viswanathan
No, I am saying something like % form_for :person, :url = { :action = update } do |f| % Got it, Yup. On Dec 3, 6:31 pm, Nellboy [EMAIL PROTECTED] wrote: Thanks Sadeesh so you're saying I should use something like: p%= submit_tag 'Save' :action = update %/p On Dec 3, 1:26 pm, sadeesh

[Rails] Re: Problems with link_to and submit_tag

2008-12-03 Thread Nellboy
ok, so I tried this and the redirect in the controller is now working, but the database is not updated... which leads me to the controller code, which must be wrong... here it is: def update @user = User.find(params[:id]) respond_to do |format| if

[Rails] Re: Sending mail templates to a mailinglist

2008-12-03 Thread Frederick Cheung
On Dec 3, 1:27 pm, Dave Smith [EMAIL PROTECTED] wrote: Frederick Cheung wrote: On Dec 3, 1:07 pm, Dave Smith [EMAIL PROTECTED] wrote: now this i know is poor programming and looks bad too.. is there a way i can just have one button that sends each of the mail templates to all the

[Rails] Re: map block issue on rails 2.2

2008-12-03 Thread sadeesh kumar viswanathan
Sorry, Your information was not sufficient to help you. Thanks, Sadeesh. On Dec 3, 6:09 pm, Hasham [EMAIL PROTECTED] wrote: I am trying to change attribute of all objects in AR collection inside a map block see: http://pastie.org/329737 but attributes are not being updated in Rails

[Rails] Re: Problem with destroying multiple records........

2008-12-03 Thread Frederick Cheung
On Dec 3, 1:20 pm, Dharmdip Rathod [EMAIL PROTECTED] wrote: Hi , i am facing problem while i am writing code e.g.  People.find_by_id(params[:id])  comment.find_by_id(params[:id]) when this execute it will delete only one record from the database which it get first. It will keep other

[Rails] Re: map block issue on rails 2.2

2008-12-03 Thread sadeesh kumar viswanathan
Here, Anyway I guess you should call the save method on it like 'user.save'. Thanks, Sadeesh. On Dec 3, 6:45 pm, sadeesh kumar viswanathan [EMAIL PROTECTED] wrote: Sorry,       Your information was not sufficient to help you. Thanks, Sadeesh. On Dec 3, 6:09 pm, Hasham [EMAIL PROTECTED]

[Rails] Re: map block issue on rails 2.2

2008-12-03 Thread Frederick Cheung
On Dec 3, 1:09 pm, Hasham [EMAIL PROTECTED] wrote: I am trying to change attribute of all objects in AR collection inside a map block see: First off, why use map when you could use each ? Secondly this looks related to what I wrote at

[Rails] Re: Problems with link_to and submit_tag

2008-12-03 Thread sadeesh kumar viswanathan
Really, Do you have field name administrator in user table? On Dec 3, 6:42 pm, Nellboy [EMAIL PROTECTED] wrote: ok, so I tried this and the redirect in the controller is now working, but the database is not updated... which leads me to the controller code, which must be wrong... here it

[Rails] Re: Problems with link_to and submit_tag

2008-12-03 Thread Nellboy
Hi Sadeesh... thanks for your help I tried this, and got an error when I tried to update: Couldn't find User with ID=update so I modified the code to: % form_for user, :url = { :action = update, :id = user.id } do | f| % and I got the same result as before... I'm thinking The problem is

[Rails] Re: The Forum Hunt continues...

2008-12-03 Thread Jeffrey Lim
Ryan Bigg wrote: There is my project called rboard http://github.com/radar/rboard compatible with latest rails and supports internationalisation cool! I realize there's a TODO.html in there. How updated is it? do u have any plans for implementing a captcha for registration? -- Posted via

[Rails] Re: Problems with link_to and submit_tag

2008-12-03 Thread Nellboy
yes, a boolean field... On Dec 3, 1:49 pm, sadeesh kumar viswanathan [EMAIL PROTECTED] wrote: Really, Do you have field name administrator in user table? On Dec 3, 6:42 pm, Nellboy [EMAIL PROTECTED] wrote: ok, so I tried this and the redirect in the controller is now working, but the

[Rails] syntax highlighting for .erb files

2008-12-03 Thread Deepa Shirur
hi i am using radrails for ruby on rails development.I am creating html.erb for my application.i have noticed syntax is not highlighting for html.erb, please help thanks in advance -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this

[Rails] Re: Needs some help with eager loading issue on a has_many through relationship

2008-12-03 Thread hoenth
Fred, I appreciate your quick response. I am confused though. I thought the point of includes was to get all of the related objects in as few db calls as possible. From the log file, it is making individual calls for each classroom and each homeroom. So for every student, it finds that

[Rails] Re: Problems with link_to and submit_tag

2008-12-03 Thread sadeesh kumar viswanathan
then check whats there in params[:user][:administrator] when you submit the form and go with it. On Dec 3, 6:52 pm, Nellboy [EMAIL PROTECTED] wrote: yes, a boolean field... On Dec 3, 1:49 pm, sadeesh kumar viswanathan [EMAIL PROTECTED] wrote: Really, Do you have field name administrator

[Rails] Re: Sending mail templates to a mailinglist

2008-12-03 Thread Dave Smith
Frederick Cheung wrote: On Dec 3, 1:27�pm, Dave Smith [EMAIL PROTECTED] wrote: over all templates in the controller. I presume somthing similar to this would work [EMAIL PROTECTED] = Mailinglist.find(params[:id]) � � @mail_templates = @mailing_list.mail_templates.collect collect with no

[Rails] check for empty? in the view

2008-12-03 Thread Martyn Elmy-liddiard
I nned to get an associsted name from one table dependent on the related id value in another table when rendering the view but cant figure out the syntax to handle pontential empty values:- i.e. docv.policy_id OR docv.standard_id will exist and therefore link back to the policies OR the

[Rails] Re: Sending mail templates to a mailinglist

2008-12-03 Thread Dave Smith
Application Trace | Framework Trace | Full Trace c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:253:in `load_missing_constant' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:468:in `const_missing'

[Rails] Re: Needs some help with eager loading issue on a has_many through relationship

2008-12-03 Thread Frederick Cheung
On Dec 3, 1:55 pm, hoenth [EMAIL PROTECTED] wrote: Fred, I appreciate your quick response. I am confused though. I thought the point of includes was to get all of the related objects in as few db calls as possible. From the log file, it is making individual calls for each classroom and

[Rails] Re: check for empty? in the view

2008-12-03 Thread Frederick Cheung
On Dec 3, 1:59 pm, Martyn Elmy-liddiard [EMAIL PROTECTED] s.net wrote: % @docversions.each do |docv| % tr td% docv.modifier %/td td%= docv.comment %/td td%= docv.policy.PolicyName if docv.policy_id %/td td%= docv.standard.StandardsName if docv.standard_id %/td Can someone advise the

[Rails] Re: Sending mail templates to a mailinglist

2008-12-03 Thread Frederick Cheung
On Dec 3, 2:03 pm, Dave Smith [EMAIL PROTECTED] wrote: Application Trace | Framework Trace | Full Trace dont worry, i fixed it by prepending Admin:: to the reference of the model.. but out of curiosity, why did it work the first time and not the second time? Probably some weird

[Rails] Re: Problems with link_to and submit_tag

2008-12-03 Thread Nellboy
ok, so i've done that... and it seems to be submitting a 'false' value no matter what I click on... the problem could well be with the following line, maybe it needs some extra options set: %= f.check_box :administrator %/p On Dec 3, 1:58 pm, sadeesh kumar viswanathan [EMAIL PROTECTED] wrote:

[Rails] Re: check for empty? in the view

2008-12-03 Thread Martyn Elmy-liddiard
Frederick Cheung wrote: On Dec 3, 1:59?pm, Martyn Elmy-liddiard [EMAIL PROTECTED] s.net wrote: don't think you need anything more than if docv.policy Fred Thanks Fred but I still get an error:- I gave a vey simple example and it may be fairer to give a slightly different example that I

[Rails] Re: check for empty? in the view

2008-12-03 Thread mahmoud said
On Wed, Dec 3, 2008 at 4:30 PM, Martyn Elmy-liddiard [EMAIL PROTECTED] wrote: Frederick Cheung wrote: On Dec 3, 1:59?pm, Martyn Elmy-liddiard [EMAIL PROTECTED] s.net wrote: don't think you need anything more than if docv.policy Fred Thanks Fred but I still get an error:- I

[Rails] using import CSV with params

2008-12-03 Thread denver
Hi Guys, I am using import CSV to import from a csv file to my database in my rails app. I want to be able to be able to add a list of email addresses from this file but also include the mailinglist_id which is a param[:id] on my page in the database entry. So in effect adding a csv of emails to

[Rails] Re: syntax highlighting for .erb files

2008-12-03 Thread Sukeerthi Adiga
Deepa Shirur wrote: hi i am using radrails for ruby on rails development.I am creating html.erb for my application.i have noticed syntax is not highlighting for html.erb, please help thanks in advance Tell what exactly happening ? ur question is not clear.. may i know which version u r usin

[Rails] Re: Problems with link_to and submit_tag

2008-12-03 Thread sadeesh kumar viswanathan
Hey, try this %=f.check_box(:administrator, options = {}, checked_value = true, unchecked_value = false)% On Dec 3, 7:23 pm, Nellboy [EMAIL PROTECTED] wrote: ok, so i've done that... and it seems to be submitting a 'false' value no matter what I click on... the problem could well be with

[Rails] Re: Rails Red5

2008-12-03 Thread Enzo Rivello
nobody know nothing? :-( -- 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-talk@googlegroups.com

[Rails] Rails functional test how to assert json result?

2008-12-03 Thread goodwill
As title, I want to have my functional test check results from a json render result, how can I achieve this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send

[Rails] Re: Problems with link_to and submit_tag

2008-12-03 Thread Nellboy
ya, i've been playing around with that for a while... i think it's the issue, but it's not accepting my submissions... On Dec 3, 2:52 pm, sadeesh kumar viswanathan [EMAIL PROTECTED] wrote: Hey, try this %=f.check_box(:administrator, options = {}, checked_value = true, unchecked_value =

[Rails] Re: check for empty? in the view

2008-12-03 Thread Martyn Elmy-liddiard
mahmoud said wrote: On Wed, Dec 3, 2008 at 4:30 PM, Martyn Elmy-liddiard [EMAIL PROTECTED] wrote: Thanks Fred but I still get an error:- ...etc and the error I get is:- You have a nil object when you didn't expect it! The error occured while evaluating nil.year -- That's

[Rails] Re: using import CSV with params

2008-12-03 Thread Thorsten Müller
if I get this right, in this line: Mailing.create!(row.to_hash) you want to add the :malinglist_id from params[:id] that should work: Mailing.create!(row.to_hash.merge!({:malinglist_id = params[:id]})) --~--~-~--~~~---~--~~ You received this message because you

[Rails] Re: check for empty? in the view

2008-12-03 Thread mahmoud said
On Wed, Dec 3, 2008 at 5:22 PM, Martyn Elmy-liddiard [EMAIL PROTECTED] wrote: mahmoud said wrote: On Wed, Dec 3, 2008 at 4:30 PM, Martyn Elmy-liddiard [EMAIL PROTECTED] wrote: Thanks Fred but I still get an error:- ...etc and the error I get is:- You have a nil object

[Rails] Re: using import CSV with params

2008-12-03 Thread Bill Walton
Hi denver, denver wrote: I am using import CSV to import from a csv file to my database in my rails app. I want to be able to be able to add a list of email addresses from this file but also include the mailinglist_id which is a param[:id] on my page in the database entry. So in effect

[Rails] Re: Thin web server

2008-12-03 Thread mahmoud said
Webrick is the webserver bundled with rails and is makes u ready to start development instantly.. it is not suitable for production environments as stated in the rails wiki http://wiki.rubyonrails.org/rails/pages/WEBrick. so get it out of the comparisons. There are several resources out there

[Rails] Re: mysql warning

2008-12-03 Thread Kaushik katari
From irb, try 'require mysql'. If you get true, then it should be installed correctly. BTW, I have the same configuration as well, and I tried Mysql 5.1, and it did not work. I had to go back to 5.0.x Kaushik On Wed, Dec 3, 2008 at 3:54 AM, Nilesh Kumar [EMAIL PROTECTED] wrote: Hi Peter. I am

[Rails] Subdomains with Rails 2.2

2008-12-03 Thread Perry D
I'm pretty new here, but if anybody had ideas on how to go about using subdomains for accounts within Rails 2.2. I had seen the subdomain-fu plugin, but it didn't look like it plays very well with 2.2. Anyone know of other plugins that might be useful?

[Rails] Re: Need Help: Deployment Issues with Voting App?

2008-12-03 Thread Leximo
This is what I get in the production log: Processing VotesController#create (for 68.55.245.214 at 2008-12-03 10:31:51) [POST] Session ID: BAh7CToMY3NyZl9pZCIlYTE4MWY4Y2JhMDY0OGE5MmRhYzNjNjUyMGUwZDhm ZmI6DnJldHVybl90byIGLzoMdXNlcl9pZGkGIgpmbGFzaElDOidBY3Rpb25D

[Rails] Re: what's the smallest device to do Rails development on???

2008-12-03 Thread Hassan Schroeder
On Tue, Dec 2, 2008 at 10:49 PM, Greg Hauptmann [EMAIL PROTECTED] wrote: What's the smallest (lightest / most compact) device that one could use to do relatively productive Rails development on? Ideally something you could carry in your pocket (i.e. I'm thinking smaller/lighter than a

[Rails] need flexible conditions hash with activerecord

2008-12-03 Thread sadeesh kumar viswanathan
Hi, I am using find method of activerecord in my code. And I am specifying conditions through hash like below, conditions = {} conditions[:deactivated_on] = !nil (conditions[:deactivated_on] = nil - this works) @accounts = Account.paginate :page=params [:page], :per_page=20, :order=name,

[Rails] help with rails+sproutcore

2008-12-03 Thread Srilatha Bhuvanapalli
I have been trying to use rails as the backend for sproutcore. I am following the tutorial: http://blog.lawrencepit.com/2008/07/19/sproutcore-rails/#comment-4 I have followed all the steps in the tutorial. When I try to run the http://localhost:4020/contacts, its gives me the following console

[Rails] Re: Rails (and MySQL) on Linux - gem install mysql

2008-12-03 Thread Jo Potts
Instructions to fix this are here: http://articles.slicehost.com/2008/7/8/ubuntu-hardy-installing-mysql-with-rails-and-php-options -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[Rails] Re: Subdomains with Rails 2.2

2008-12-03 Thread Andrew Bloom
The code to configure this is fairly trivial, try something like this in the controller(s) you need subdomain access. before_filter :load_account def load_account @account = Account.find(:first, :conditions = [slug = ?, request.subdomains.first]) raise ActiveRecord::RecordNotFound unless

[Rails] Re: polymorphic_url for index

2008-12-03 Thread glennpow
Try: polymorphic_url([EMAIL PROTECTED], ChildClass.new]) If the array contains an item which is new (not saved), then it uses the plural form of path (index). On Nov 14, 8:36 am, Gabi Ge [EMAIL PROTECTED] wrote: Perhaps I should be more specific: I'm using STI (single table inheritance) and

[Rails] Re: validates acceptance of question

2008-12-03 Thread Philip Hallstrom
On Dec 2, 2008, at 10:05 PM, [EMAIL PROTECTED] wrote: Yes, :agreement is a field in my database. Should I remove it? In any case I did set the :accept = true, but it didn't change anything. I get the same error when I submit the form whether or not the box is checked. Set :accept = true

[Rails] Re: recommend me project-management tool

2008-12-03 Thread Philip Hallstrom
hello. Can you recommend me some really simple project-management tool, running on rails? Something designed for really small teams and projects, with simple setup and interface. Thanks! Redmine is pretty straightforward as well...

[Rails] Re: Rails (and MySQL) on Linux - gem install mysql

2008-12-03 Thread Rick
On unix systems you can typically do which mysql_config and you'll find that the libraries are $(which mysql_config)/../lib. Then you can use Fred's tip and: gem install mysql -- --with-mysql-config=$(which mysql_config) Rick On Dec 3, 8:15 am, Jo Potts [EMAIL PROTECTED] wrote: Instructions

[Rails] serialize with Marshal, YAML, or what?

2008-12-03 Thread Jonathan Rochkind
If I want to serialize/unserialize arbitrary objects (not just ARs) in a Rails app, what's the best way to do it? Using 'Marshal' seems to be ruby standard. But then there's YAML. And then I feel like maybe Rails adds yet another way to do it, but I can't remember what it is and might be

[Rails] Re: serialize with Marshal, YAML, or what?

2008-12-03 Thread Frederick Cheung
On Dec 3, 5:47 pm, Jonathan Rochkind [EMAIL PROTECTED] s.net wrote: If I want to serialize/unserialize arbitrary objects (not just ARs) in a Rails app, what's the best way to do it? Using 'Marshal' seems to be ruby standard. But then there's YAML. And then I feel like maybe Rails adds yet

[Rails] Editable Data Grid?

2008-12-03 Thread sa 125
Hello, Being a new transfer to rails from ASP.NET, I'm looking for some help on how to approach an old problem with RoR. I build and maintain my company's internal data site. We deal with finances, and thus I have pages to display data grids of clients, products, accounts and all that. These

[Rails] has_many through combinations error

2008-12-03 Thread phil
I have these classes: class FilmTitle ActiveRecord::Base has_many :films_film_titles has_many :films, :through = :films_film_titles has_many :assets, :through = :films end class Film ActiveRecord::Base has_many :assets end class FilmsFilmTitle ActiveRecord::Base belongs_to :film

[Rails] Check a checkbox and disable a field with Javascript

2008-12-03 Thread Joe Peck
Good afternoon to you all, I have an order form where people can check the fruits they want and select the price of each fruit that they have checked. When I click the checkbox now, it does not seem to affect the corresponding price dropdown. What am I doing wrong? Here's the javascript:

[Rails] Re: what's the smallest device to do Rails development on???

2008-12-03 Thread tonypm
I use an eeepc 900 running Fedora, with Netbeans ide. (Fedora 10 now includes Netbeans in the package repository, and now supports wireless out of the box). Don't try it with windows though, just too slow. But Fedora actually running on the external SDHC card works well for me. Dual screen

[Rails] Re: syntax highlighting for .erb files

2008-12-03 Thread NAYAK
Hi Deepa, I would suggest you to shift to Netbeans ruby which is better than Radrails I have been using Radrails about 1.5 years and recently shifted to Netbeans (6 months back and am happy with it) as Radrails was crashing multiple times and I found that Netbeans had better support for html and

  1   2   >