[Rails] Re: Send mail and embed image

2011-10-18 Thread sreid
Hi, You could send your email multi-part. For this you normally need 2 templates - html and txt. In the html template, you can include images as with normal html, and if the recipient accepts html format emails, he will see the image (otherwise he gets the txt version). See more here

[Rails] ruby interpreter dies with system popup message

2011-10-18 Thread Jedrin
I sometimes get this message on a dev box I log into remotely: Ruby Interpreter (CUI) 1.9.2p180 [i386-mingw32] has stopped working A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available.

[Rails] Re: ruby interpreter dies with system popup message

2011-10-18 Thread Jedrin
A note on my latest test with this problem is that if I run the upload script that uploads pdf files to the rails server and try to access a web page from a browser on the server while that script is running, it seems to cause the problem. If I just run the script without accessing the web page,

[Rails] Re: ruby interpreter dies with system popup message

2011-10-18 Thread Jedrin
This whole system is eventually going to linux at some point, so hopefully if that happens the diagnostics will be better then .. -- 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] difference in generate scaffold files with different rails versions

2011-10-18 Thread genterminl
I've found a difference in the files created by ./script/rails generate scaffold Model xxx with rails 2.3.14 and ./script/generate scaffold Model xxx with rails 3.0.10 that doesn't make sense to me. (both with ruby 1.8.7 on Gentoo Linux) With 2.3.14, near the beginning of

[Rails] Re: Fallback for CDN asset loading

2011-10-18 Thread Karel
Hi Tim, That's what I'm doing and it works just fine. Though the second script tag belongs to the first one and could be generated/linked to it. It is just an idea that would make it cleaner and more self contained. -- You received this message because you are subscribed to the Google Groups

[Rails] Re: meta tags via helper - assistance needed

2011-10-18 Thread Nathan Wu
module LayoutHelper def title(page_title, show_title = true) content_for(:title) { h(page_title.to_s) } @show_title = show_title end def show_title? @show_title end def stylesheet(*args) content_for(:head) { stylesheet_link_tag(*args) } end def javascript(*args)

[Rails] Ruby on Rails Bootcamp Training

2011-10-18 Thread ruby . nuby
Can anyone recommend good bootcamp style training (at least a week, ideally 7-10 days) in early 2012 ? I am happy to travel anywhere in the world but need to book a class soon that will definitely run and most of the classes I have found like Big Nerd Ranch (which looks excellent) don't

[Rails] will_paginate and checkboxes

2011-10-18 Thread mdfdroid
Hi all, I am working on a project and I got excited to get pagination and ajax working. I am using rails 3.1. What I have is a form for creating a client, and inside that form i have a table that I have implemented ajax, search, sort, and pagination following a railscasts using will_paginate.

[Rails] Re: difference in generate scaffold files with different rails versions

2011-10-18 Thread Frederick Cheung
On Oct 18, 12:39 am, genterminl ostrof...@users.sourceforge.net wrote: I've found a difference in the files created by ./script/rails generate scaffold Model xxx with rails 2.3.14 and ./script/generate scaffold Model xxx with rails 3.0.10 that doesn't make sense to me. (both with ruby 1.8.7

[Rails] Re: adding key/value pairs to hash wrongfully adds a right bracket

2011-10-18 Thread Frederick Cheung
On Oct 17, 10:27 pm, John Merlino stoici...@aol.com wrote: Hey all, THis line of code gets called multiple times and creates a hash:   def session_code(unit_id, code)     s_code = session[:code]     unit_id_hash = s_code.detect {|h| h[unit_id]}     if unit_id_hash.nil?      

[Rails] Re: Fallback for CDN asset loading

2011-10-18 Thread Tim Shaffer
Gotcha. You could always create a helper for it. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/HweoZagzy1cJ. To post to this group, send email

[Rails] Beginner: has_many relationship Active Record Associations

2011-10-18 Thread Chris
Hi There, I got stuck in a Problem with Active Record Associations. There are some Meals and each meal has many sides. But it's only this single direction - so a side don't need to belong to the meal. I don't wanna search: Give me the meals where side is ... I'll show you the problem with an

[Rails] [Beginner] fields_for within each loop

2011-10-18 Thread Hakjune Kim
Hello Please help me to find this code work. I'm trying to make a report with predefined questions. I have made questions from the scaffold and filled it. Now is to assign answer fields per each questions. [DATA TYPE] class Report ActiveRecord::Base has_many :answer_singles end class

Re: [Rails] Beginner: has_many relationship Active Record Associations

2011-10-18 Thread Michael Pavling
On 18 Oct 2011 12:56, Chris christian.frei...@googlemail.com wrote: There are some Meals and each meal has many sides. But it's only this single direction - so a side don't need to belong to the meal. I don't wanna search: Give me the meals where side is ... So one Side could be associated

Re: [Rails] Beginner: has_many relationship Active Record Associations

2011-10-18 Thread Colin Law
On 18 October 2011 13:09, Michael Pavling pavl...@gmail.com wrote: On 18 Oct 2011 12:56, Chris christian.frei...@googlemail.com wrote: There are some Meals and each meal has many sides. But it's only this single direction - so a side don't need to belong to the meal. I don't wanna search:

[Rails] Re: meta tags via helper - assistance needed

2011-10-18 Thread Ray Parker
To accept content, showing default if none, in your layout %= content_for?(:meta_block) ? yield(:meta_block) : meta_block $ Called in your content.html.erb that uses the above layout. %= content_for(:meta_block) do $ %= meta_block(Yield, Got it now!)% % end % On Oct 18, 4:08 am, Nathan Wu

[Rails] performance of the rails code and total time

2011-10-18 Thread Neetin Kumar
Hi, Currently for load one page in browser one specific url is taking 20 sec of time where as in production.log also it show completed time is 20 sec. Is there any tool or way to know the where it is taking time? Means time in which action or controller or at system level. Please help me.

[Rails] Re: performance of the rails code and total time

2011-10-18 Thread Robert Walker
Neetin Kumar wrote in post #1027210: Hi, Currently for load one page in browser one specific url is taking 20 sec of time where as in production.log also it show completed time is 20 sec. Is there any tool or way to know the where it is taking time? Means time in which action or

[Rails] Generate model from database

2011-10-18 Thread prasetya utama
hello i want to ask, how to generate model from table in my database. That's possibel ? -- 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

Re: [Rails] Generate model from database

2011-10-18 Thread Colin Law
On 18 October 2011 15:01, prasetya utama li...@ruby-forum.com wrote: hello i want to ask, how to generate model from table in my database. That's possibel ? If you have a table widgets then all you need for the model is a file models/widget.rb containing class Widget ActiveRecord::Base end

[Rails] Re: Generate model from database

2011-10-18 Thread prasetya utama
@colin : i haven't understand, can you explain how to make it. may be script for generate it like if i want generate controller (ruby script/generate ...) -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails:

Re: [Rails] Re: Generate model from database

2011-10-18 Thread Colin Law
On 18 October 2011 15:59, prasetya utama li...@ruby-forum.com wrote: Please don't top post, it makes it difficult to follow the thread, insert your reply at appropriate points in previous message. Thanks. @colin : i haven't understand, can you explain how to make it. may be script for

[Rails] Initialize a variable at start

2011-10-18 Thread Hesham
I have a class variable (@neo) that that get initialized by using something: Graph.connect where the connect method will initialize the variable @neo Right now I call the Graph.connect method in any other class that needs to have the variable initialized. is there a way to have the variable

[Rails] Re: Generate model from database

2011-10-18 Thread prasetya utama
yes i want to generate model, but the table has been created in databases. And i want generate that table :) -- 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

Re: [Rails] Initialize a variable at start

2011-10-18 Thread Colin Law
On 18 October 2011 16:25, Hesham hesham.am...@gmail.com wrote: I have  a class variable (@neo) that that get initialized by using something: Graph.connect where the connect method will initialize the variable @neo Right now I call the Graph.connect method in any other class that needs to

Re: [Rails] Re: Generate model from database

2011-10-18 Thread Colin Law
On 18 October 2011 16:25, prasetya utama li...@ruby-forum.com wrote: yes i want to generate model, but the table has been created in databases. And i want generate that table :) I asked last time that you don't top post, it makes it difficult to follow the thread, insert your reply at

[Rails] Re: Initialize a variable at start

2011-10-18 Thread Hesham
On Oct 18, 7:34 pm, Colin Law clan...@googlemail.com wrote: On 18 October 2011 16:25, Hesham hesham.am...@gmail.com wrote: I have  a class variable (@neo) that that get initialized by using something: Graph.connect where the connect method will initialize the variable @neo Right

[Rails] Re: Generate model from database

2011-10-18 Thread prasetya utama
Thanks colin, for your advice :) and your coment -- 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. To unsubscribe from this

[Rails] Re: Re: Generate model from database

2011-10-18 Thread prasetya utama
Colin Law wrote in post #1027233: On 18 October 2011 16:25, prasetya utama li...@ruby-forum.com wrote: yes i want to generate model, but the table has been created in databases. And i want generate that table :) I asked last time that you don't top post, it makes it difficult to follow the

Re: [Rails] Re: Initialize a variable at start

2011-10-18 Thread Colin Law
On 18 October 2011 16:43, Hesham hesham.am...@gmail.com wrote: On Oct 18, 7:34 pm, Colin Law clan...@googlemail.com wrote: On 18 October 2011 16:25, Hesham hesham.am...@gmail.com wrote: I have  a class variable (@neo) that that get initialized by using something: Graph.connect where

[Rails] check_box_tag call action on change (AJAX)

2011-10-18 Thread Nimbuzz77
Hi all, I'm developing an application with Rails 3.0.9 and I have a checkbox and I want to call a function when it is checked/uchecked. I'm trying with: %= check_box_tag mylabel t.to_s, false, { :onchange = remote_function( :url = { :action = 'update_preview', :id = t.to_s })} % in the show view

[Rails] Can i run Ruby Web Application by Renaming application ?

2011-10-18 Thread Chopo
Hi i am new on this ruby track . I need help . I have a Web Application in Ruby on Rails application named 'myapplication ' which is running on the server . InstantRails is used. If i want to make a replica application named 'myapplication_test' in same server the what i need to do ...Please

[Rails] Re: Initialize a variable at start

2011-10-18 Thread Hesham
On Oct 18, 7:59 pm, Colin Law clan...@googlemail.com wrote: On 18 October 2011 16:43, Hesham hesham.am...@gmail.com wrote: On Oct 18, 7:34 pm, Colin Law clan...@googlemail.com wrote: On 18 October 2011 16:25, Hesham hesham.am...@gmail.com wrote: I have  a class variable

[Rails] Re: Initialize a variable at start

2011-10-18 Thread Hesham
On Oct 18, 9:33 pm, Hesham hesham.am...@gmail.com wrote: On Oct 18, 7:59 pm, Colin Law clan...@googlemail.com wrote: On 18 October 2011 16:43, Hesham hesham.am...@gmail.com wrote: On Oct 18, 7:34 pm, Colin Law clan...@googlemail.com wrote: On 18 October 2011 16:25, Hesham

Re: [Rails] Can i run Ruby Web Application by Renaming application ?

2011-10-18 Thread Colin Law
On 18 October 2011 16:34, Chopo santanuguha2...@gmail.com wrote: Hi i am new on this ruby track . I need help . I have a Web Application in Ruby on Rails application named 'myapplication ' which is running on the server . InstantRails is used. If i want to make a replica application named

[Rails] [JOB] Ruby on Rails Developer, NYC | 100-120k

2011-10-18 Thread OSS
** Other Ruby and/or Rails positions available at http://opensourcestaffing.wordpress.com This is a full time, on-site, salaried Ruby on Rails Developer position located in New York City paying $100,000-$120,000 depending on experience + benefits. No telecommuting allowed. US Citizens or Green

[Rails] Re: difference in generate scaffold files with different rails versions

2011-10-18 Thread genterminl
On Oct 18, 6:17 am, Frederick Cheung frederick.che...@gmail.com wrote: On Oct 18, 12:39 am, genterminl ostrof...@users.sourceforge.net wrote: I've found a difference in the files created by ./script/rails generate scaffold Model xxx with rails 2.3.14 and ./script/generate scaffold Model

[Rails] Re: Generate model from database

2011-10-18 Thread genterminl
Oct 18, 11:40 am, Colin Law clan...@googlemail.com wrote: On 18 October 2011 16:25, prasetya utama li...@ruby-forum.com wrote: yes i want to generate model, but the table has been created in databases. And i want generate that table :) You say that you want to generate just the model, so

Re: [Rails] Can i run Ruby Web Application by Renaming application ?

2011-10-18 Thread Norm Scherer
On 10/18/2011 12:20 PM, Colin Law wrote: On 18 October 2011 16:34, Choposantanuguha2...@gmail.com wrote: Hi i am new on this ruby track . I need help . I have a Web Application in Ruby on Rails application named 'myapplication ' which is running on the server . InstantRails is used. If i

[Rails] Re: RSpec 2 not working on Rails 3.1.1

2011-10-18 Thread Logan Abbott
I am having the exact same issue. Help is appreciated. Logan -- 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. To