[Rails] Re: Rails 3 mysql date

2010-10-12 Thread Erol Fornoles
Found a plugin which aims to address localization and delocalization, but may be useful for this problem: http://github.com/clemens/delocalize On Oct 12, 8:02 am, johne john.ebe...@gmail.com wrote: It appears this is the issue. http://slightlycoded.com/blog/ruby-1-9-date-problems What is

[Rails] Re: Unable to rake db:create

2010-10-12 Thread Premanshu Mishra
The output is all same except: rake aborted! syntax error on line 8, col 15: `n' The yml file at [application_name]/config/ is as follows: development: adapter:mysql encoding:utf8 reconnect:false database:accounts_development pool:5 username: root password: host:localhost -- Posted

Re: [Rails] Re: Unable to rake db:create

2010-10-12 Thread rajeevsharma86
please provide a traced aoutput On Tue, Oct 12, 2010 at 11:36 AM, Premanshu Mishra li...@ruby-forum.comwrote: The output is all same except: rake aborted! syntax error on line 8, col 15: `n' The yml file at [application_name]/config/ is as follows: development: adapter:mysql

[Rails] Re: Default routes in rails 3.0

2010-10-12 Thread nobosh
nice! On Oct 11, 8:44 pm, egervari ken.egerv...@gmail.com wrote: Okay, I think I fixed it: I added this line and that works:   resources :tasks Phew... On Oct 11, 11:36 pm, egervari ken.egerv...@gmail.com wrote: Basically nothing. I don't think the generators put anything here for

[Rails] Re: Unable to rake db:create

2010-10-12 Thread Premanshu Mishra
C:\Ruby187\rails\accountsrake db:migrate --trace (in C:/Ruby187/rails/accounts) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment rake aborted! syntax error on line 8, col 15: `¼+?' C:/Ruby187/lib/ruby/1.8/yaml.rb:133:in `load'

Re: [Rails] Re: Unable to rake db:create

2010-10-12 Thread rajeevsharma86
provide space in 8th line after password: On Tue, Oct 12, 2010 at 11:56 AM, Premanshu Mishra li...@ruby-forum.comwrote: C:\Ruby187\rails\accountsrake db:migrate --trace (in C:/Ruby187/rails/accounts) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment

[Rails] Re: How old are you?

2010-10-12 Thread tonypm
I don't mind admitting I am 54 - I am aiming to keep learning and developing my skills as long as I can. I am self employed working on my own, so this forum is a lifeline to keeping in touch with what is developing and picking up on how to do things better. I always find it helpful when concepts

Re: [Rails] Default routes in rails 3.0

2010-10-12 Thread Maksim Gudovsikov
Hi, default routes are commented out by default in rails 3 as a security issue. So you can't reach any action on your controllers if you just know or guess the name of it. /:controller(/:action(/:id))(.:format) You can comment it in again if you want to. It is at the bottom of routes.rb. Max.

[Rails] Re: Re: Unable to rake db:create

2010-10-12 Thread Premanshu Mishra
I had provided a space as well. The output is : rake aborted! syntax error on line 8, col 15: `n' C:/Ruby187/lib/ruby/1.8/yaml.rb:133:in `load' C:/Ruby187/lib/ruby/1.8/yaml.rb:133:in `load' C:/Ruby187/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:902:in `databas e_configuration'

[Rails] Could not find linecache-0.43 in any of the sources

2010-10-12 Thread Rishtal
Hi Everyone, I have updated to rails 3. When I try to run my rails server by doing this command: rails server. I get this error: Could not find linecache-0.43 in any of the sources. Try running 'bundle install'. I try bundle install and I get another error saying installing linechaceh 0.43

Re: [Rails] Modelling parent/child accounts with other models

2010-10-12 Thread Colin Law
On 12 October 2010 05:42, David Raffauf li...@ruby-forum.com wrote: I am creating an application that involves: Accounts People (Many people belong to one account) ..and various other models... Companies Projects Services ... I'm trying to find what the best way is to denote that any

Re: [Rails] Re: Re: Unable to rake db:create

2010-10-12 Thread rajeevsharma86
no man its about space only you have to give a space after evry columns On Tue, Oct 12, 2010 at 1:17 PM, Premanshu Mishra li...@ruby-forum.comwrote: I had provided a space as well. The output is : rake aborted! syntax error on line 8, col 15: `n' C:/Ruby187/lib/ruby/1.8/yaml.rb:133:in

[Rails] Re: card reader or bar code reader in rails URGENT HELP

2010-10-12 Thread Juliew9855 Juliew9855
Hi ! I've just visited this forum. Happy to get acquainted with you. Thanks. __ http://moviesonlineworld.com -- 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

[Rails] acts_as_list and single table inheritence

2010-10-12 Thread Ganesh Kathare
Hello Rails experts, Need your help in following issue with the bacts_as_list and single table inheritence/b Code details : #model file class bRelatedItem/b ActiveRecord::Base acts_as_list :scope = :relater belongs_to :relater, :polymorphic=true end class RelatedLink bRelatedItem/b end

[Rails] Re: How old are you?

2010-10-12 Thread Richard Burton
pepe wrote in post #949294: Didn't you used to go out with that lady...? What's her name...? Oh yes! Elizabeth Taylor? I don't think you're 21! I'm working on finding a chick with that name :) -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed

[Rails] yml file structure

2010-10-12 Thread Premanshu Mishra
Hi All, rake db:create is not working. It is giving an error like ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment rake aborted! syntax error on line 17, col -1: `' My yml file reads like: development: adapter:mysql encoding:utf8 reconnect:false

[Rails] Re: Rails 3 mysql date

2010-10-12 Thread Javix
You can try to personalize you jQuery datepicker as follows: [code] $(#project_formatted_start_date).datepicker({ altField: '#project_formatted_start_date',altFormat: 'yy-mm-dd'}); [/code] See jQuery API for datepicker for more details. On Oct 10, 9:43 pm, johne john.ebe...@gmail.com wrote: I

Re: [Rails] yml file structure

2010-10-12 Thread Maksim Gudovsikov
Am 12.10.2010 10:34, schrieb Premanshu Mishra: Hi All, rake db:create is not working. It is giving an error like ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment rake aborted! syntax error on line 17, col -1: `' My yml file reads like:

Re: [Rails] yml file structure

2010-10-12 Thread Colin Law
On 12 October 2010 09:34, Premanshu Mishra li...@ruby-forum.com wrote: Hi All, rake db:create is not working. It is giving an error like ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment rake aborted! syntax error on line 17, col -1: `' My yml

[Rails] Re: Nooby Stuck - has_and_belongs_to_many relationship

2010-10-12 Thread Al Rowan
I had done a reload! before doing those console commands, i even rebooted! lol my schemes_work table contains a scheme and work field only. not scheme_id nor work_id should i change them? i was following the configuration from a tutorial where they did the same. so i just assumed that was

[Rails] Re: yml file structure

2010-10-12 Thread Premanshu Mishra
No luck :( I have attached my yml. There is space at the beginning of each line (from encoding onwards). There is space between : and the corresponding value. There is one space at the end after password: From the early morning this rake has raked my brains out...Pls help..And many many thanks

Re: [Rails] Re: yml file structure

2010-10-12 Thread Maksim Gudovsikov
Hi, you can't attach files on this mailing list. You need two whitespaces at the beginning of the line. See the part i posted in the last mail. Hope that helps. Max. P.S. Why don't you just take the generated database.yml and replace the values you need without touching the rest of it? Am

[Rails] Re: Nooby Stuck - has_and_belongs_to_many relationship

2010-10-12 Thread Al Rowan
could it be because i've used t.refrences and not t.integer I only say this because, I tried to rename the columns and it threw up the error Missing column schemes_works.scheme using def self.up rename_column :schemes_works, :scheme, :scheme_id rename_column :schemes_works, :work, :work_id

[Rails] Re: Nooby Stuck - has_and_belongs_to_many relationship

2010-10-12 Thread Al Rowan
ok so, i added the _id to both..same error. i also changed it from refrences to integer and it gave me the same 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

[Rails] Re: Ajax call, no route matches?

2010-10-12 Thread Paul Harte
Hey guys, I managed to resolve this one. It turns out the line i had inserted in routes.rb was being affected by a 'members' statement before it, causing it to generate the wrong route. I simply moved the line ahead of this to resolve the issue, the AJAX call seems to work fine now. Thanks

[Rails] RJS element is null, Prototype Error?

2010-10-12 Thread Hans Hartmann
Hi there, if got some problems getting the Ajax.Request to work with rails. sending the request via onclick works but the interpretaition fails if I execute: render :update do |page| page.replace 'test', :text = 'it works' end I get 2 alerts: RJS error: TypeError: $(#test) is null

[Rails] Rails 3 engines testing

2010-10-12 Thread Michael Rigart
Hi, does anyone can help me by telling how you can properly test rails 3 engines? Since engines don't necessarily have db connections on its own, how can you test your models? I could use a test database, but how do you configure you test then to create and use that connection? Thank you in

[Rails] Re: RJS element is null, Prototype Error?

2010-10-12 Thread Frederick Cheung
On Oct 12, 11:36 am, Hans Hartmann li...@ruby-forum.com wrote: TypeError: $(#test).replaceWith is not a function $(#test).replaceWith(it works); I did %= javascript_include_tag :default % in the application, but i'm not quite sure if prototype is really implemented. How can I check this?

[Rails] link_to('Previous Page', :back) doesn't work

2010-10-12 Thread smajima
Hello forks, I develop some site for our client. If the page uses validation of Rails and error occurs I can't back previous page. If no errors it works. Does anyone have experience of this problem? Rails version is 2.3.8. Thank you in advance -- You received this message because you are

[Rails] Re: How old are you?

2010-10-12 Thread smajima
Hi I'm 54. Provable the eldest one in this mailing list. Why do you care about age? On 10月11日, 午後11:03, Richard Burton li...@ruby-forum.com wrote: Just curious how old we all are? Not that it really matters but I was just wondering. To get the ball rolling, I'm 21. -- Posted

[Rails] RJS vs Javascript Template in Rails 3?

2010-10-12 Thread Samnang
Hi all, I start looking in unobtrusive javascript functionality in Rails 3. I couldn't make any different when to use RJS vs pure Javascript template. For example: #RJS: page.replace_html, 'some_div', :partial = 'some_partial' #JS $(some_div).update(%= escape_javascript(render('some_partial'))

[Rails] Re: sunspot_rails vs websolr-sunspot_rails

2010-10-12 Thread Andreas S.
Solr is very easy to setup and maintain, if you have a dedicated server with a few hundred MBs RAM to spare I would recommend running your own. -- 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

[Rails] Re: Re: yml file structure

2010-10-12 Thread Premanshu Mishra
Tons of thanks to you Max and the other Railers: Rajeev and Colin. Its working with two spaces in front of every line. And I added the password as well. And a final enter after entering the password. I'm so happy.. again my thanks Premanshu -- Posted via http://www.ruby-forum.com/.

[Rails] Re: RJS element is null, Prototype Error?

2010-10-12 Thread Hans Hartmann
page.replace seems to be a helper which automatically searchs for $('#test') ... in other rails-projects it always worked liked that. the v.2.0.0 I got by listing my gems via command line. Isn't there a possibility to get the page.replace to work? if i do page.document.getElementById('test')

[Rails] Re: Ajax not working with form_remote_tag!

2010-10-12 Thread Zack Nathan
Phillip wrote in post #949370: def view date_1 = params[:date_1] date_2 = params[:date_2] type = params[:type] @graph = open_flash_chart_object(758,400, show(date_1, date_2, type)) render :update do |page| page.replace_html results, :partial = path_to_view

[Rails] Re: Modelling parent/child accounts with other models

2010-10-12 Thread AppleII717
On Oct 12, 2:53 am, Colin Law clan...@googlemail.com wrote: On 12 October 2010 05:42, David Raffauf li...@ruby-forum.com wrote: I am creating an application that involves: Accounts People (Many people belong to one account) ..and various other models... Companies Projects

[Rails] STI and :through, not working?

2010-10-12 Thread Christian Fazzini
Artist.first.medias returns all medias. Media is an STI. Media can be video or painting. How do I return all paintings of an artist? Only paintings, not videos? In my Artist model, I tried putting: has_many :paintings, :through = :medias In console, I do: Artist.first.paintings.all And I

[Rails] Re: Modelling parent/child accounts with other models

2010-10-12 Thread AppleII717
On Oct 11, 11:42 pm, David Raffauf li...@ruby-forum.com wrote: I am creating an application that involves: Accounts People (Many people belong to one account) ..and various other models... Companies Projects Services ... I'm trying to find what the best way is to denote that any of

[Rails] Re: Modelling parent/child accounts with other models

2010-10-12 Thread AppleII717
Sorry for double post, it said my session had timed out and didn't think the first one went through. Don't see a way to delete the post. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to

[Rails] Re: Add line break to custom error message

2010-10-12 Thread Jim Burgess
Just a follow up in case this helps anyone else: You could also probably put a literal br in the error message, then use unescape_html. As it turns out, simple_format was wrapping everything in p tags, which was causing invalid html to be generated in the error view of my form. So, I tried

[Rails] Re: Unable to rake db:create

2010-10-12 Thread Luis Lavena
On Oct 12, 2:02 am, Premanshu Mishra li...@ruby-forum.com wrote: I m using ruby 1.8.7 on rails 2.3.5 with mysql 5.0 on windows. C:\Ruby187\rails\accountsrake db:create (in C:/Ruby187/rails/accounts) rake aborted! syntax error on line 2, col 0: `encoding:utf8' The following is the yml file

[Rails] Re: STI and :through, not working?

2010-10-12 Thread Erol Fornoles
That's not how :through works. has_many :through associations are only used when there is an intermediate model between them. What you can do is: has_many :medias, :class_name = Media # Will return all media, including paintings and videos has_many :paintings, :class_name = Painting has_many

[Rails] Re: RJS element is null, Prototype Error?

2010-10-12 Thread Hans Hartmann
How can I get the page.replace to work? -- 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,

[Rails] Re: RJS element is null, Prototype Error?

2010-10-12 Thread Hans Hartmann
new infos: If i try the page.insert_html in my errored application, i get for page.insert_html, :bottom, test, :text = it works. try { $(#test).append(it works.); } catch (e) { alert('RJS error:\n\n' + e.toString()); alert('$(\#test555\).append(\it works.\);'); throw e } In an application

[Rails] Re: Nooby Stuck - has_and_belongs_to_many relationship

2010-10-12 Thread Al Rowan
dont know if this helps at all.. ? scheme.works.empty? ActiveRecord::StatementInvalid: SQLite3::SQLException: no such column: schemes_works.scheme_id: SELECT * FROM works INNER JOIN schemes_works ON works.id = schemes_works.work_id WHERE (schemes_works.scheme_id = 21 ) from

[Rails] Re: problem with has_many

2010-10-12 Thread Luis Saffie
What you want to use is :accept_nested_attributes in your models class Profile ActiveRecord::Base has_many :responsibles accepts_nested_attributes :responsibles end And then you'll want to do something like this in your view % form_for @profile do |profile_form| % %=

[Rails] Cancan, how to allow artists to edit their own

2010-10-12 Thread Christian Fazzini
What am I doing wrong here? I am using cancan on Rails 3. In my Ability class, I've got: class Ability include CanCan::Ability def initialize(user) user ||= User.new # guest user, for users who are not registered or don't have an account yet if user.role? :admin can :manage,

[Rails] Re: STI and :through, not working?

2010-10-12 Thread Christian Fazzini
Ok, I got it to work with: @events = @artist.medias.where(:type = 'Event') On Oct 12, 7:53 pm, Erol Fornoles erol.forno...@gmail.com wrote: That's not how :through works. has_many :through associations are only used when there is an intermediate model between them. What you can do is:

Re: [Rails] Re: How old are you?

2010-10-12 Thread Colin Law
On 12 October 2010 10:21, smajima susumu.maj...@gmail.com wrote: Hi I'm 54. Provable the eldest one in this mailing list. Why do you care about age? I think my 61 beats that. I wrote my first code 42 years ago (Elliott 803, paper tape input, 1kHz cycle time (yes, kHz)). I expect there are

[Rails] Re: Unable to rake db:create

2010-10-12 Thread Raghavendra Joshi
hi, Actually while installing mysql 5.0 it asks for password. Google for how to set the password in mysql and in your database.yml file, maintain single space between every field e.g. adapter: mysql, encoding: utf8 and so on. This might solve your problem. On Oct 12, 10:02 am, Premanshu

Re: [Rails] Re: Ajax not working with form_remote_tag!

2010-10-12 Thread Colin Law
On 12 October 2010 01:34, Zack Nathan li...@ruby-forum.com wrote: It doesnt seem to be posting anything.. :s Are you seeing the post in the log? If not then it is the submit that is failing. Have a look at the html for the form and see if you can see anything wrong (View, Page Source or

[Rails] Re: How old are you?

2010-10-12 Thread Ar Chron
David Kahn wrote in post #947370: So if you dropped the box and they got out of order That's why any serious programmer back in those days (not that I would know personally of anything like that) carried colored markers to mark stripes diagonally across the top of the batched deck...

Re: [Rails] Re: Modelling parent/child accounts with other models

2010-10-12 Thread Colin Law
On 12 October 2010 12:16, AppleII717 sa...@mac.com wrote: Sorry for double post, it said my session had timed out and didn't think the first one went through. Don't see a way to delete the post. This is a mailing list so once sent you cannot delete it. Otherwise you would need access to my PC

[Rails] Re: Nooby Stuck - has_and_belongs_to_many relationship

2010-10-12 Thread Al Rowan
solved that last error by changing it back from the extra _id -- 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

[Rails] Re: Unable to rake db:create

2010-10-12 Thread Raghavendra Joshi
hi, you better reinstall mysql. While installing it will ask for password. and default user name is root On Oct 12, 11:06 am, Premanshu Mishra li...@ruby-forum.com wrote: The output is all same except: rake aborted! syntax error on line 8, col 15: `n' The yml file at

[Rails] Re: Cancan, how to allow artists to edit their own

2010-10-12 Thread Christian Fazzini
By the way. I am using Devise, if that even matters On Oct 12, 8:41 pm, Christian Fazzini christian.fazz...@gmail.com wrote: What am I doing wrong here? I am using cancan on Rails 3. In my Ability class, I've got: class Ability   include CanCan::Ability   def initialize(user)     user ||=

[Rails] Re: Cancan, how to allow artists to edit their own

2010-10-12 Thread Christian Fazzini
Small code typo. In VideoController#index. It should have been: % if can? :update, video % div class=interaction clearfix %= link_to 'edit', '#' % %= link_to 'delete', '#', :class = 'last' % /div % end % On Oct 12, 9:05 pm,

[Rails] Re: How old are you?

2010-10-12 Thread pepe
Didn't you used to go out with that lady...? What's her name...? Oh yes! Elizabeth Taylor? I don't think you're 21! I'm working on finding a chick with that name :) Good luck with that one! It would be too funny if you did. :) Almost 45 and (hopefully) keeping counting. -- You received

Re: [Rails] Re: How old are you?

2010-10-12 Thread Rodrigo Mendonça
twenty five years... six months ago i started in Rails world... i am a new developer... i am happy now (PHP and Java was a wrong way for me for seven years) Ruby + Rails + Jquery is very powefull for me 2010/10/12 pepe p...@betterrpg.com Didn't you used to go out with that lady...? What's

[Rails] Re: Use of Editors(like Radrails,Netbeans) in ROR?

2010-10-12 Thread pepe
i will change a label named School Name to College Name will I be able to change it using radrails or i have to go to my app directory and change it there in the particular file. RadRails or any IDE will allow you to edit the files of your application, so when you say 'using radrails or i have

[Rails] Re: Cancan, how to allow artists to edit their own

2010-10-12 Thread Christian Fazzini
Any thoughts? Also worth noting that Video and Paintings inherit from Media. Media is an STI On Oct 12, 9:07 pm, Christian Fazzini christian.fazz...@gmail.com wrote: Small code typo. In VideoController#index. It should have been:           % if can? :update, video %             div

[Rails] Re: Ajax not working with form_remote_tag!

2010-10-12 Thread Zack Nathan
Well then the submit must be failing because nothing appears in the log. This is very odd :S. Thanks, Zack. -- 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

[Rails] Re: What am I doing wrong with find_in_batches?

2010-10-12 Thread Lee Smith
Perfect! Thanks Erol. I knew it was something very basic. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to

[Rails] Re: How old are you?

2010-10-12 Thread MarcRic
I'm 52. You can get a little more about me here: http://www.marcric.com/ -- MarcRic www.marcric.com http://marcricblog.blogspot.com/ http://www.traineronrails.com/ http://groups.google.com.br/group/riorubyrails On Oct 11, 11:03 am, Richard Burton li...@ruby-forum.com wrote: Just curious how

[Rails] Re: Modelling parent/child accounts with other models

2010-10-12 Thread David Raffauf
Thanks for the responses. I think my application probably matches the Basecamp style of account handling. I think for simplicity I can keep everything project-centric and use the accounts to show who owns which projects @account.projects @account.projects.companies @account.projects.people

Re: [Rails] Re: How old are you?

2010-10-12 Thread David Kahn
This is a really cool thread. Really, I had the impression that everyone here was in there 20's and boy/girl geniuses. I feel less of an outlier. I read about a study that managers overestimate the salaries of their peers and those managers below them and underestimate the salary of peers above.

Re: [Rails] Re: How old are you?

2010-10-12 Thread Walter Lee Davis
I'm 46. My first (and only formal) CS course was conducted using teletypes and a mainframe in Canada, while I was in Phoenix AZ: the McGill University System for Interactive Computing, or MUSIC, which taught us BASIC. There was a card reader in the building, but I never used it for

Re: [Rails] Re: Cancan, how to allow artists to edit their own

2010-10-12 Thread radhames brito
What is the last error you got? -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to

Re: [Rails] Re: How old are you?

2010-10-12 Thread Jason Soo
Just turned 24 --- Jason Soo I'm going to live forever or die trying. On Tue, Oct 12, 2010 at 8:51 AM, Walter Lee Davis wa...@wdstudio.comwrote: I'm 46. My first (and only formal) CS course was conducted using teletypes and a mainframe in Canada, while I was in Phoenix AZ: the McGill

[Rails] Re: Help on Rails3: html_safe don't unescape

2010-10-12 Thread Robert Walker
Henrik wrote in post #949279: I'm upgrading my CMS app to rails 3, but some parts just don't get unescaped :-(: From application.html.erb: % for article in topplinker % % nr = nr + 1 -% %= text2html(article.ingress, article.cloth).html_safe % # - Here it

Re: [Rails] Re: How old are you?

2010-10-12 Thread Edmond Kachale
I am 3 bytes years old. :-) --- Edmond Software Developer | Baobab Health Trust (http://www.baobabhealth.org/) | Malawi Cell: +265 999 465 137 | +265 881 234 717 *Leading the Improvement of Health through Information and Communication Technology in the Developing World The **Creed* of *Baobab

[Rails] Re: Cancan, how to allow artists to edit their own

2010-10-12 Thread Christian Fazzini
undefined method `user' for :index:Symbol On Oct 12, 10:00 pm, radhames brito rbri...@gmail.com wrote: What is the last error you got? -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to

[Rails] Re: Cancan, how to allow artists to edit their own

2010-10-12 Thread Christian Fazzini
does cancan expect me to have a user method in my user model or something? On Oct 12, 10:44 pm, Christian Fazzini christian.fazz...@gmail.com wrote: undefined method `user' for :index:Symbol On Oct 12, 10:00 pm, radhames brito rbri...@gmail.com wrote: What is the last error you got? --

[Rails] Re: Nooby Stuck - has_and_belongs_to_many relationship

2010-10-12 Thread Al Rowan
through some strange coincidence, my mac crashed. after a reboot it now all works. sorry for wasting your marnen and thanks very much for your assistance. I'm quite stumped as to what actually triggered the fix, I haven't done anything really. I am using Aptana Studio 3...(still in beta)

[Rails] errors.add - how can i set the whole message?

2010-10-12 Thread Max Williams
Hi all. I'm using Rails 2.3.4. If i do this myobj.errors.add(:password, was incorrect) then the password field gets an error, which comes out as Password was incorrect. However, i want the message to be Please note that passwords are case sensitive. I know that i could add this message as an

[Rails] Re: Server extremely slow?!

2010-10-12 Thread Heinz Strunk
Erol Fornoles wrote in post #947325: I know you've already resolved your problem, but for the sake of discussion, WEBrick in it's default state is notoriously slow when being accessed remotely. You can speed it up by looking for webrick/ config.rb in your ruby's install path and changing the

[Rails] Re: Cancan, how to allow artists to edit their own

2010-10-12 Thread Christian Fazzini
Ok... I must have been using old cancan code. Back when I was still on Rails 2.3.8. The new doc says: can :manage, Painting, :artist_id = user.artist.id Which now seems to work without any errors On Oct 12, 10:55 pm, Christian Fazzini christian.fazz...@gmail.com wrote: does cancan expect me to

[Rails] Re: Re: Display only when date changes

2010-10-12 Thread Leonel *.*
Have you got a new line before the { ? It must all be on one line so that ruby knows the { is the start of a block for the group_by call. So the following all on one line: % @appointments.group_by { |appointment| appointment.start.strftime(%Y-%m-%d) }.each_pair do |start_date,

[Rails] Off topic - A new Ruby book

2010-10-12 Thread Karthikeyan
Hello People, I have written a free to use Ruby book http://is.gd/fYNuH Hope you people read it and give your suggestions. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to

[Rails] Re: errors.add, setting the whole message

2010-10-12 Thread Max Williams
Sjoerd Andringa wrote in post #943536: 2. Override the default error message for this kind of error on this particular attribute (Also see documentation for http://apidock.com/rails/ActiveRecord/Error/generate_full_message): In app_root/config/locales/en.yml: en: activerecord:

[Rails] Re: Re: Display only when date changes

2010-10-12 Thread Leonel *.*
This is all too confusing!! How can I understand what's going on? I already studied TWO rails books and seems like I barely touched the minimum basics! I studied Simply Rails by Sitepoint and Agile Web Development with Rails by Pragmatic Programmers. I just ordered the pickaxe book last week

[Rails] raw needed on select tag options? Rails3/Ruby1.9.2

2010-10-12 Thread Tony Primerano
When passing a string of options to select tag it appears it you need to use raw. This does not work %= select_tag people, optionDavid/option % This does %= select_tag people, raw(optionDavid/option) % Is this WAD? (Working As Designed). example usage taken from

[Rails] Re: Rails 3 engines testing

2010-10-12 Thread ehansen486
Try Jose Valim's EngineX (http://github.com/josevalim/enginex). This works really well for me. -- Eric On Oct 12, 3:39 am, Michael Rigart li...@ruby-forum.com wrote: Hi, does anyone can help me by telling how you can properly test rails 3 engines? Since engines don't necessarily have db

[Rails] Re: streaming a large XML file; optimizing large file downloads in RAILS

2010-10-12 Thread ehansen486
Hi Fred- What you're saying makes a lot of sense. As your automatic-flushing- the-rails-3-1-plan article relates, for most rails interactions it's difficult to stream because of all the evaluation that needs to occur. Larger file downloads really are a special case. Using rails metal to

[Rails] Re: How old are you?

2010-10-12 Thread AppleII717
I'm 54. Provable the eldest one in this mailing list. Why do you care about age? I think my 61 beats that.  I wrote my first code 42 years ago (Elliott 803, paper tape input, 1kHz cycle time (yes, kHz)).  I expect there are older still.  I care about age because at some point my

[Rails] Rails app, upload via api, test via curl

2010-10-12 Thread Slash Vuk
How can i make my photo rails app to receive images (and handling them with paperclip) through the built in API using paperclip plugin. My app working fine on the web app side..How can i test the API with curl command? How can specify the end-point url? thanks. -- Posted via

Re: [Rails] Re: How old are you?

2010-10-12 Thread Philip Hallstrom
On Oct 12, 2010, at 6:44 AM, David Kahn wrote: This is a really cool thread. Really, I had the impression that everyone here was in there 20's and boy/girl geniuses. I feel less of an outlier. Not all of us. It is interesting for sure! For the record... I'm 36. First computer was a

[Rails] New to RoR, RoR Guides

2010-10-12 Thread Nick Parkin
Hi Guys. I'm a developer, not full time, but I'm studying Information Systems (and so learning VB.NET) and also learnt extensive Python and Java at school, but I really would love to learn Ruby on Rails as as far as I'm concerned you can really build some killer web applications using it and many

[Rails] Re: Use of Editors(like Radrails,Netbeans) in ROR?

2010-10-12 Thread Marnen Laibow-Koser
pepe wrote in post #949502: [...] Many people here don't like IDE's and like to just use a 'simpler' editor. Many of them like TextMate. I find IDEs useful if only because they allow you to search/replace easily any text within the project. So do good (non-IDE) editors like TextMate or

Re: [Rails] New to RoR, RoR Guides

2010-10-12 Thread Anh Tang
http://railstutorial.org/ On Tue, Oct 12, 2010 at 11:57 AM, Nick Parkin li...@ruby-forum.com wrote: Hi Guys. I'm a developer, not full time, but I'm studying Information Systems (and so learning VB.NET http://vb.net/) and also learnt extensive Python and Java at school, but I really would

[Rails] Re: New to RoR, RoR Guides

2010-10-12 Thread Nick Parkin
Anh Tang wrote in post #949571: http://railstutorial.org/ Thanks Anh :) Actually seen this one already, find it a bit difficult to follow at times, so any other suggestions would be welcomed? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed

Re: [Rails] Re: New to RoR, RoR Guides

2010-10-12 Thread jason white
http://railscasts.com http://peepcode.com http://pragprog.com/titles/rails4/agile-web-development-with-rails On Tue, Oct 12, 2010 at 12:18 PM, Nick Parkin li...@ruby-forum.com wrote: Anh Tang wrote in post #949571: http://railstutorial.org/ Thanks Anh :) Actually seen this one already, find

Re: [Rails] Re: Use of Editors(like Radrails,Netbeans) in ROR?

2010-10-12 Thread Greg Donald
On Tue, Oct 12, 2010 at 12:05 PM, Marnen Laibow-Koser li...@ruby-forum.com wrote: They also help with refactoring, etc. Have you ever seen an IDE that actually does this effectively for Ruby? I have not. Neither have I. Every Ruby IDE I've tried falls flat on it's face as far as code

[Rails] Re: Re: Re: Model identification strategy [Was: I need help with a design]

2010-10-12 Thread Marnen Laibow-Koser
Colin Law wrote in post #947005: On 8 October 2010 21:58, Marnen Laibow-Koser li...@ruby-forum.com wrote: functionality of the current phase of development. Which, at any given time, is all we care about. My turn to say No! I agree that one should not do extra work to add features that

[Rails] Re: Re: New to RoR, RoR Guides

2010-10-12 Thread Nick Parkin
jason white wrote in post #949574: http://railscasts.com http://peepcode.com http://pragprog.com/titles/rails4/agile-web-development-with-rails Thanks -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] Re: Re: Use of Editors(like Radrails,Netbeans) in ROR?

2010-10-12 Thread Marnen Laibow-Koser
Greg Donald wrote in post #949575: On Tue, Oct 12, 2010 at 12:05 PM, Marnen Laibow-Koser li...@ruby-forum.com wrote: They also help with refactoring, etc. Have you ever seen an IDE that actually does this effectively for Ruby? I have not. Neither have I. Every Ruby IDE I've tried falls

[Rails] If variable is not empty

2010-10-12 Thread Leonel *.*
(MOVED FROM RUBY FORUM) How can I create an if statement to check if a variable contains a value? If it does contain a value, I want to send an email. I'm doing the following but it doesn't work... EXTRACT

[Rails] Re: Re: Display only when date changes

2010-10-12 Thread Leonel *.*
Please help :-( -- 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 email to

[Rails] Re: If variable is not empty

2010-10-12 Thread Luis Saffie
You can try this Notifier.appointment_booked(@appointment).deliver unless @appointment.client.email.nil? -- 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

Re: [Rails] Re: Re: Display only when date changes

2010-10-12 Thread Jason Stover
ERROR undefined local variable or method `appointment' for ##Class:0x104c62280:0x104c60520 Extracted source (around line #16): 13: % @appointments.group_by { |appointment| appointment.start.strftime(%Y-%d-%d) }.each_pair do |start_date,

  1   2   >