[Rails] CheckBox with Value and Drop down menu
I am a newbie in Ruby. I would to ask from all the experts in Ruby on how to create a checkbox with value as well as a dropdown menu. I want it like this site http://www.celiac.com/glutenfreemall/advanced_search.php. Their search form is good and I want to learn every aspect in doing it. Hope you can give me a step-by-step tutorial in doing it. Thanks in advance. -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] CheckBox with Value and Drop down menu
I am a newbie in Ruby. I would to ask from all the experts in Ruby on how to create a checkbox with value as well as a dropdown menu. I want it like this site http://www.celiac.com/glutenfreemall/advanced_search.php. Their search form is good and I want to learn every aspect in doing it. Hope you can give me a step-by-step tutorial in doing it. Thanks in advance. -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] CheckBox with Value and Drop down menu
checkbox -- http://api.rubyonrails.org/classes/ActionView/Helpers/FormTagHelper.html#method-i-check_box_tag selectbox -- http://api.rubyonrails.org/classes/ActionView/Helpers/FormTagHelper.html#method-i-select_tag On Fri, Oct 12, 2012 at 12:11 PM, Marychris Nuñeza li...@ruby-forum.comwrote: I am a newbie in Ruby. I would to ask from all the experts in Ruby on how to create a checkbox with value as well as a dropdown menu. I want it like this site http://www.celiac.com/glutenfreemall/advanced_search.php. Their search form is good and I want to learn every aspect in doing it. Hope you can give me a step-by-step tutorial in doing it. Thanks in advance. -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Thanks, Aash -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] [JOBS] Looking to Source Multiple AGile Teams for High Profile Client
I need to source a local Agile (Scrum) team (4 people) in NYC for a long-term contract, and at least 2 remote teams (can be anywhere). If you are interested please contact me. For NYC I'm looking for the following roles, all expenses will be paid: Architect Lead Engineer Release Engineer Scrum Master Remote teams will have similar make ups, with 5-7 members per team. Initially will need 2 remote teams, will likely scale to 4 teams. -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/nc5-JCXIhYsJ. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] *** A great opportunity for ROR developer to join a rapidly growing business - Sydney Based ***
Please contact me by email on james.gil...@pra.com.au or call me on +61 2 8234 3521. They will sponsor overseas candidates so a great chance to get into a great country and great company!! -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/csvhKQhqG-MJ. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: what;s the right url in this case
Try to run rake routes to see all the routes of your current application. -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/PCvguqo-gE4J. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] CheckBox with Value and Drop down menu
Hai! I hope the above link is okay for you... http://api.rubyonrails.org/classes/ActionView/Helpers/FormTagHelper.html by bdeveloper01 -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: How to make a model or a model decorator aware of its controller in Rails?
On Monday, October 8, 2012 7:37:21 PM UTC+2, Matt Jones wrote: On Monday, 8 October 2012 01:38:22 UTC-7, Alexey wrote: I will answer myself: i think a decorator is not a good place to store an associated controller, a decorator should only know about model data and HTML markup. I am still looking for a good solution. In your example, the controller path seems *highly* relevant to generating HTML markup... --Matt Jones Matt, i do not agree: if my application changes the host, or i decide to change route names or controller names, the link urls will change, but html tags or model behavior will not. I think controller awareness should be added on a different level, not in a decorator (single responsibility principle). -Alexey. -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/bstYup5LzikJ. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Re: How to make a model or a model decorator aware of its controller in Rails?
On Monday, October 8, 2012 11:02:19 AM UTC+2, Brett McHargue wrote: You could check out http://objectsonrails.com/ and https://github.com/objects-on-rails/display-case - as it says, it brings together the model and context (which could be a controller) brett Thanks, i'll look into it. -Alexey. -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/Gv8aFj1IGEkJ. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: [JOBS] Looking to Source Multiple AGile Teams for High Profile Client
On Friday, October 12, 2012 1:40:02 AM UTC+5:30, Ernie Varitimos wrote: I need to source a local Agile (Scrum) team (4 people) in NYC for a long-term contract, and at least 2 remote teams (can be anywhere). If you are interested please contact me. For NYC I'm looking for the following roles, all expenses will be paid: Architect Lead Engineer Release Engineer Scrum Master Remote teams will have similar make ups, with 5-7 members per team. Initially will need 2 remote teams, will likely scale to 4 teams. -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/lk0Zud5QLs8J. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: [JOBS] Looking to Source Multiple AGile Teams for High Profile Client
Hi, I am interested please let me know other details. regards, Mukesh On Friday, October 12, 2012 1:40:02 AM UTC+5:30, Ernie Varitimos wrote: I need to source a local Agile (Scrum) team (4 people) in NYC for a long-term contract, and at least 2 remote teams (can be anywhere). If you are interested please contact me. For NYC I'm looking for the following roles, all expenses will be paid: Architect Lead Engineer Release Engineer Scrum Master Remote teams will have similar make ups, with 5-7 members per team. Initially will need 2 remote teams, will likely scale to 4 teams. -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/Jy2gj-4F6H4J. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: back /front page question
Or you can give a parameter from new.html.erb or edit.html.erb to _form.html.erb. In the _form.html.erb,check the parameter where it from and do the different things. 在 2012年10月11日星期四UTC+9上午3时29分40秒,roelof写道: Hello, Imaging I want to use another layout for show and one for edit and new. Must I then make two different application layouts with 2 css files or can I do that with 1 layout file and 1 css file ? Roelof -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/3rriuvdPOjgJ. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: back /front page question
Thanks for all the answers and solutions. Now see what will work for me. Roelof Op vrijdag 12 oktober 2012 10:40:00 UTC+2 schreef zhangjingqiang het volgende: Or you can give a parameter from new.html.erb or edit.html.erb to _form.html.erb. In the _form.html.erb,check the parameter where it from and do the different things. 在 2012年10月11日星期四UTC+9上午3时29分40秒,roelof写道: Hello, Imaging I want to use another layout for show and one for edit and new. Must I then make two different application layouts with 2 css files or can I do that with 1 layout file and 1 css file ? Roelof -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/9UFmtFHljyEJ. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Which one is best for debugging (Pry or Ruby Debug) ?
Hi all I study and understand both the gem , now i am confuse which is one best. Let me know which one is best for debugging ? Is either Pry or Ruby Debug ? Also explain advantage of your selected gem ? Thanks Regards Fahim Babar Patel -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/T68z8J2ZCwcJ. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Which one is best for debugging (Pry or Ruby Debug) ?
As far as I understood the differences ruby debug just sends you to irb, while pry sends you to the pry console which has syntax highlight, code completion and other sugar. But I am not aware of the differences in how to use them because I use neither. Also as far as I know ruby debug doesn't work with ruby 1.9, bit pry does. Am 12.10.2012 12:22 schrieb Fahim Patel pafa...@gmail.com: Hi all I study and understand both the gem , now i am confuse which is one best. Let me know which one is best for debugging ? Is either Pry or Ruby Debug ? Also explain advantage of your selected gem ? Thanks Regards Fahim Babar Patel -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/T68z8J2ZCwcJ. For more options, visit https://groups.google.com/groups/opt_out. -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: Rails 3.2 what are the best gems for full-text search in sql db ?
On Thursday, 11 October 2012 13:45:02 UTC-4, Erwin wrote: there are a lot of solutions , some gems requiring a separate server setup... I need to search for occurrences of some 'text in multiple columns ( :name; :email, :description, ..) Should I actually setup a SOLr server ? Depending on what you're looking for, Sunspot may be useful - I've used it for a number of projects that needed full-text seach + filtering etc. There's a Railscast that should help you get started: http://railscasts.com/episodes/278-search-with-sunspot --Matt Jones -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/gvulhcVGBrEJ. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Which one is best for debugging (Pry or Ruby Debug) ?
Thanks for reply. Still can u tell me which one is best for debuging Bye On Friday, October 12, 2012 7:18:52 PM UTC+5:30, Norbert Melzer wrote: As far as I understood the differences ruby debug just sends you to irb, while pry sends you to the pry console which has syntax highlight, code completion and other sugar. But I am not aware of the differences in how to use them because I use neither. Also as far as I know ruby debug doesn't work with ruby 1.9, bit pry does. Am 12.10.2012 12:22 schrieb Fahim Patel paf...@gmail.com javascript: : Hi all I study and understand both the gem , now i am confuse which is one best. Let me know which one is best for debugging ? Is either Pry or Ruby Debug ? Also explain advantage of your selected gem ? Thanks Regards Fahim Babar Patel -- 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 rubyonra...@googlegroups.comjavascript: . To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com javascript:. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/T68z8J2ZCwcJ. For more options, visit https://groups.google.com/groups/opt_out. -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/GTWEodLAlUEJ. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Which one is best for debugging (Pry or Ruby Debug) ?
Hi, On Fri, Oct 12, 2012 at 5:22 AM, Fahim Patel pafa...@gmail.com wrote: Let me know which one is best for debugging ? Pry is a cross-over REPL (IMO) that replaces IRB and not Ruby Debugger. I say it's cross-over because it supports some of what Ruby Debugger does with addons and sometimes even built and also supports all of what IRB does with some enhancements such as tab completion, code spacing and syntax highlighting as well as supporting an easy way to tap into an object with an REPL easily. There are also other things like the ability to show the source of a class, a method and source around where you are (if you are in a method.) Is either Pry or Ruby Debug ? It's too much to compare Pry to Ruby Debugger because nothing can replace Ruby Debugger in some cases but if you were throw Pry against IRB for pure Ruby code it's going to be Pry all the way IMNSHO. Nothing beats throwing binding.pry in the middle of everything and figuring out what's going on from a live server, such as times when something is going wrong in a model or controller or a decorator I will throw a binding.pry in there and visit the page and follow the tracks all the way down the line until I run into that line that is causing the problem and then test what fixes it, write a test and fix the code with the edit command and go on about my day. Also explain advantage of your selected gem ? That's something you have to figure out for yourself but I listed some above. -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: Rails 3.2 what are the best gems for full-text search in sql db ?
On Friday, 12 October 2012 09:12:45 UTC-5, Matt Jones wrote: Depending on what you're looking for, Sunspot may be useful - I've used it for a number of projects that needed full-text seach + filtering etc. There's a Railscast that should help you get started: http://railscasts.com/episodes/278-search-with-sunspot I'm gonna definitely second this suggestion if you don't have PG. I still somewhat like PG to save some money but I love working with solr when I have the chance and I would definitely choose it for a project with sunspot. -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/c3s0O3DlVXUJ. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Which one is best for debugging (Pry or Ruby Debug) ?
On Friday, October 12, 2012 8:49:23 PM UTC+5:30, Jordon Bedwell wrote: Hi, On Fri, Oct 12, 2012 at 5:22 AM, Fahim Patel paf...@gmail.comjavascript: wrote: Let me know which one is best for debugging ? Pry is a cross-over REPL (IMO) that replaces IRB and not Ruby Debugger. I say it's cross-over because it supports some of what Ruby Debugger does with addons and sometimes even built and also supports all of what IRB does with some enhancements such as tab completion, code spacing and syntax highlighting as well as supporting an easy way to tap into an object with an REPL easily. There are also other things like the ability to show the source of a class, a method and source around where you are (if you are in a method.) Is either Pry or Ruby Debug ? It's too much to compare Pry to Ruby Debugger because nothing can replace Ruby Debugger in some cases but if you were throw Pry against IRB for pure Ruby code it's going to be Pry all the way IMNSHO. Nothing beats throwing binding.pry in the middle of everything and figuring out what's going on from a live server, such as times when something is going wrong in a model or controller or a decorator I will throw a binding.pry in there and visit the page and follow the tracks all the way down the line until I run into that line that is causing the problem and then test what fixes it, write a test and fix the code with the edit command and go on about my day. As we use binding.pry , but we use same debugger in ruby debugger. And as per my knowledge debugger do same thing as binding.pry.If not than explain ? Also explain advantage of your selected gem ? That's something you have to figure out for yourself but I listed some above. -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/KCO1Oj9YHKcJ. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Which one is best for debugging (Pry or Ruby Debug) ?
On Friday, 12 October 2012 10:33:05 UTC-5, Fahim Patel wrote: As we use binding.pry , but we use same debugger in ruby debugger. And as per my knowledge debugger do same thing as binding.pry.If not than explain ? They do. But there is a distinction in that one's only goal is to debug, the other is a cross-over tool who is stuck between deciding on if it's a REPL or a debugger. By nature it has debugging tools but by theory it's just a more advanced way to test concepts without needing to jump in and out of the terminal (unless you use VI or other) to test ideas. Most at #pry will probably not deny that Pry is a Debugger just as they will most probably not deny that Pry is a REPL which makes it a tranny (I had to) cross-over tool. I remember Banister working hard to bring more debugging tools into Pry but I haven't talked to him for a while so I don't know if that's still the case. So to address your question, I prefer Pry 90% of the time, I test all my concept code in Pry before writing it so I can work out pieces of the idea and make sure they are as bug free as possible without full testing, I also use it to debug pieces of code. So hopefully this explains what I mean. -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/R5YtokUFLZEJ. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Which one is best for debugging (Pry or Ruby Debug) ?
On Friday, October 12, 2012 9:18:57 PM UTC+5:30, Jordon Bedwell wrote: On Friday, 12 October 2012 10:33:05 UTC-5, Fahim Patel wrote: As we use binding.pry , but we use same debugger in ruby debugger. And as per my knowledge debugger do same thing as binding.pry.If not than explain ? They do. But there is a distinction in that one's only goal is to debug, the other is a cross-over tool who is stuck between deciding on if it's a REPL or a debugger. By nature it has debugging tools but by theory it's just a more advanced way to test concepts without needing to jump in and out of the terminal (unless you use VI or other) to test ideas. Most at #pry will probably not deny that Pry is a Debugger just as they will most probably not deny that Pry is a REPL which makes it a tranny (I had to) cross-over tool. I remember Banister working hard to bring more debugging tools into Pry but I haven't talked to him for a while so I don't know if that's still the case. So to address your question, I prefer Pry 90% of the time, I test all my concept code in Pry before writing it so I can work out pieces of the idea and make sure they are as bug free as possible without full testing, I also use it to debug pieces of code. So hopefully this explains what I mean. Thanks thanks lot for reply. i will use pry now. But one question raised when u used this lines, which as follows :- 1. Pry is a REPL 2. cross-over tool What this lines means. Regards Fahim Babar Patel -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/2vulXCOyBH0J. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Which one is best for debugging (Pry or Ruby Debug) ?
I read article about REPL, i understood. But what your cross over tool lines says.? On Friday, October 12, 2012 9:25:58 PM UTC+5:30, Fahim Patel wrote: On Friday, October 12, 2012 9:18:57 PM UTC+5:30, Jordon Bedwell wrote: On Friday, 12 October 2012 10:33:05 UTC-5, Fahim Patel wrote: As we use binding.pry , but we use same debugger in ruby debugger. And as per my knowledge debugger do same thing as binding.pry.If not than explain ? They do. But there is a distinction in that one's only goal is to debug, the other is a cross-over tool who is stuck between deciding on if it's a REPL or a debugger. By nature it has debugging tools but by theory it's just a more advanced way to test concepts without needing to jump in and out of the terminal (unless you use VI or other) to test ideas. Most at #pry will probably not deny that Pry is a Debugger just as they will most probably not deny that Pry is a REPL which makes it a tranny (I had to) cross-over tool. I remember Banister working hard to bring more debugging tools into Pry but I haven't talked to him for a while so I don't know if that's still the case. So to address your question, I prefer Pry 90% of the time, I test all my concept code in Pry before writing it so I can work out pieces of the idea and make sure they are as bug free as possible without full testing, I also use it to debug pieces of code. So hopefully this explains what I mean. Thanks thanks lot for reply. i will use pry now. But one question raised when u used this lines, which as follows :- 1. Pry is a REPL 2. cross-over tool What this lines means. Regards Fahim Babar Patel -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/dlxOyhC2YY0J. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Which one is best for debugging (Pry or Ruby Debug) ?
On Friday, 12 October 2012 10:55:58 UTC-5, Fahim Patel wrote: 1. Pry is a REPL 2. cross-over tool What this lines means. 1.) Read-eval-print loop, 2.) Stolen from car marketing (though I have no idea if it originates there), basically a cross-over was a mix between an SUV/Minivan and a car. In this case Pry is the cross-over it's a mix between an REPL and debugger. -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/-gckRVA45kgJ. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Which one is best for debugging (Pry or Ruby Debug) ?
Did u have any knowledge related to any deployment tool. On Friday, October 12, 2012 9:31:42 PM UTC+5:30, Jordon Bedwell wrote: On Friday, 12 October 2012 10:55:58 UTC-5, Fahim Patel wrote: 1. Pry is a REPL 2. cross-over tool What this lines means. 1.) Read-eval-print loop, 2.) Stolen from car marketing (though I have no idea if it originates there), basically a cross-over was a mix between an SUV/Minivan and a car. In this case Pry is the cross-over it's a mix between an REPL and debugger. -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/IiHGj9FIsjQJ. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Which one is best for debugging (Pry or Ruby Debug) ?
On 12 October 2012 16:48, Jordon Bedwell envyge...@gmail.com wrote: On Friday, 12 October 2012 10:33:05 UTC-5, Fahim Patel wrote: As we use binding.pry , but we use same debugger in ruby debugger. And as per my knowledge debugger do same thing as binding.pry.If not than explain ? They do. But there is a distinction in that one's only goal is to debug, the other is a cross-over tool who is stuck between deciding on if it's a REPL or a debugger. By nature it has debugging tools but by theory it's just a more advanced way to test concepts without needing to jump in and out of the terminal (unless you use VI or other) to test ideas. Most at #pry will probably not deny that Pry is a Debugger just as they will most probably not deny that Pry is a REPL which makes it a tranny (I had to) cross-over tool. I remember Banister working hard to bring more debugging tools into Pry but I haven't talked to him for a while so I don't know if that's still the case. So to address your question, I prefer Pry 90% of the time, I test all my concept code in Pry before writing it so I can work out pieces of the idea and make sure they are as bug free as possible without full testing, I also use it to debug pieces of code. So hopefully this explains what I mean. Jordan, thanks for all the info on pry, I have been contemplating giving it a go and your posts have encouraged me to get on with it. Colin -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] What is the best way to check if a method is a singleton method or an instance method?
Let's say I want to check if a method of an object is an instance method or a singleton method, what is the best way to do it? -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] [JOBS] Hacker / Co-Founder - Start-up - Equity Basis | www.seriousoffer.com
We're a small team of serial start-uppers based in the South East of England. We're looking for a co-founder come technical partner to get involved in a whole new project. The concept has been defined and tested and the commercial aspects of the project have been worked out. We need to find an individual capable of building a website from scratch to meet the (fairly simple) business requirements. The site itself will be straightforward in that there's no really difficult functionality required to realise the concept. As we're looking for someone to be involved from the get-go the amount of equity on offer reflects the fact that this is very much an opportunity for someone looking for a serious stake in a business that could become successful in a short amount of time. Initially we would like this person to participate in the planning discussion / process who can then go on and complete the work remotely. The position can work from our offices in Central London if this suits, but we are equally happy for someone to be based remotely And/Or work on this project around other paid work assignments. Please email Haydn on *seriousof...@ymail.com*seriousof...@ymail.comif you're interested to discuss (please include a contact number) -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/FbrJz7C15lgJ. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: Consuming RESTful api with activeResource
Maybe you can use the Custom Methods (http://api.rubyonrails.org/classes/ActiveResource/CustomMethods.html) to try if it works. And the try to use the normal ActiveResource ... -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/_EEA4JhgBvUJ. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] AR validation question
What is the best way to implement a validation for a withdrawal operation? So there is an Operation and Client models. Client has_many :operations. In case of withdrawal operation, I'd like to check if the requested sum is not greater than a Client account balance. How to link the validation in the Operation model to a specific client ? class Client AR has_many :operations end class Operation AR belongs_to :client attr_accessible :sum end The routes are defined so that an operation could only created in the context of a Client. Thanks -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/9_Fv6SCrRiwJ. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] AR validation question
On 12 October 2012 22:15, Javix s.camb...@gmail.com wrote: What is the best way to implement a validation for a withdrawal operation? So there is an Operation and Client models. Client has_many :operations. In case of withdrawal operation, I'd like to check if the requested sum is not greater than a Client account balance. How to link the validation in the Operation model to a specific client ? In the custom validation of the operation you can use self.client to give you its client. Colin class Client AR has_many :operations end class Operation AR belongs_to :client attr_accessible :sum end -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Re: Rails 3.2 what are the best gems for full-text search in sql db ?
On Fri, Oct 12, 2012 at 8:24 AM, Jordon Bedwell envyge...@gmail.com wrote: Depending on what you're looking for, Sunspot may be useful I'm gonna definitely second this suggestion if you don't have PG. I still somewhat like PG to save some money but I love working with solr What does that last sentence mean? Solr is FOSS. -- Hassan Schroeder hassan.schroe...@gmail.com http://about.me/hassanschroeder twitter: @hassan -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Re: Consuming RESTful api with activeResource
There is the remove_root method, is this what you want? https://github.com/rails/rails/blob/6b4bbb427455ec1af6bdf0896a62129bd3c8c4aa/activeresource/lib/active_resource/formats.rb#L14 2012/10/11 arturo drlt li...@ruby-forum.com So far I came with a solution for two of this issues: 1) Url using a pluralized name of the object User solved with: self.collection_name = user 2) Removing the extension from the URL, I solve this adding a Module that I found googling around to override some methods of AR. I thought that I had found the solution for another problem, removing the element_name from the json adding: ActiveResource::Base.include_root_in_json = nil But my json still have this node {user:{email:hi'\n}} -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Fernando Almeida www.fernandoalmeida.net -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Re: Consuming RESTful api with activeResource
Or do you want the ActiveResource::Base.include_root_in_json = false ? https://github.com/rails/activeresource/blob/master/test/cases/base_test.rb#L1092 2012/10/13 Fernando Almeida ferna...@fernandoalmeida.net There is the remove_root method, is this what you want? https://github.com/rails/rails/blob/6b4bbb427455ec1af6bdf0896a62129bd3c8c4aa/activeresource/lib/active_resource/formats.rb#L14 2012/10/11 arturo drlt li...@ruby-forum.com So far I came with a solution for two of this issues: 1) Url using a pluralized name of the object User solved with: self.collection_name = user 2) Removing the extension from the URL, I solve this adding a Module that I found googling around to override some methods of AR. I thought that I had found the solution for another problem, removing the element_name from the json adding: ActiveResource::Base.include_root_in_json = nil But my json still have this node {user:{email:hi'\n}} -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Fernando Almeida www.fernandoalmeida.net -- Fernando Almeida www.fernandoalmeida.net -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Re: Rails 3.2 what are the best gems for full-text search in sql db ?
On Fri, Oct 12, 2012 at 4:40 PM, Hassan Schroeder hassan.schroe...@gmail.com wrote: What does that last sentence mean? Solr is FOSS. It means what it means. Obviously you think that Solr runs on Unicorn farts and not on servers, that or you think that servers are free. -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] What is the best way to check if a method is a singleton method or an instance method?
object.singleton_methods.include? :the_method 2012/10/12 John Merlino stoici...@aol.com Let's say I want to check if a method of an object is an instance method or a singleton method, what is the best way to do it? -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Piantanida, Ignacio Julián -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] IRB vs ruby-doc.org
The ruby documentation says instance_variable_set is a public instance method of Object: http://ruby-doc.org/core-1.9.3/Object.html#method-i-instance_variable_set And I believe it because you can call it on instances of Object: 1.9.3p0 :005 Object.new.instance_variable_set :@a, 1 = 1 It can't be a public instance method of Class or Module, because otherwise the Object instance wouldnt have access to it, since the above Object instance is an instance of Object, whose superclass is BasicObject and that's it. So my question is why when I launch IRB in Rails 3/Ruby 1.9.3, and return as an array the instance methods of Object, instance_variable_set is no where to be found: 1.9.3p0 :001 Object.instance_methods(false) = [:psych_to_yaml, :to_yaml_properties, :to_yaml, :in?, :blank?, :present?, :presence, :acts_like?, :try, :html_safe?, :duplicable?, :to_param, :to_query, :`, :instance_values, :instance_variable_names, :to_json, :with_options, :as_json] Shouldn't instance_variable_set be listed here? -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] IRB vs ruby-doc.org
Object includes the Kernel module, which defines the :instance_variable_set method 1.9.3p194 :001 Kernel.instance_methods(false).include? :instance_variable_set = true 1.9.3p194 :002 Object.is_a? Kernel = true 2012/10/13 John Merlino stoici...@aol.com The ruby documentation says instance_variable_set is a public instance method of Object: http://ruby-doc.org/core-1.9.3/Object.html#method-i-instance_variable_set And I believe it because you can call it on instances of Object: 1.9.3p0 :005 Object.new.instance_variable_set :@a, 1 = 1 It can't be a public instance method of Class or Module, because otherwise the Object instance wouldnt have access to it, since the above Object instance is an instance of Object, whose superclass is BasicObject and that's it. So my question is why when I launch IRB in Rails 3/Ruby 1.9.3, and return as an array the instance methods of Object, instance_variable_set is no where to be found: 1.9.3p0 :001 Object.instance_methods(false) = [:psych_to_yaml, :to_yaml_properties, :to_yaml, :in?, :blank?, :present?, :presence, :acts_like?, :try, :html_safe?, :duplicable?, :to_param, :to_query, :`, :instance_values, :instance_variable_names, :to_json, :with_options, :as_json] Shouldn't instance_variable_set be listed here? -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Piantanida, Ignacio Julián -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Re: Rails 3.2 what are the best gems for full-text search in sql db ?
I've been using pg_search, so I could do full text search on Heroku *for free* (vs. paying for their WebSolr or other full text search add-ons). However, that has some serious problems, but I've figured out some workarounds, and made slides for a lightning talk. They're available at: https://www.slideshare.net/dare2xl/full-text-search-on-heroku-for-free/ -Dave -- Dave Aronson, T. Rex of Codosaurus, LLC... aka Available Secret-Cleared Ruby/Rails Freelancer (NoVa/DC/Remote); see http://www.Codosaur.us/. -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Database design, working but looking for better ways
Rails 3.1.3 Hi. I have designed the database used for my travel plan application. You should be able to look at the diagram in the link below, hopefully. https://cacoo.com/diagrams/biDSyxh8yzk2kIeg (belongs_to is omitted since it's obvious) Basically, the application can list the destinations from a choice of the departure. Not mention that the departure_id (integer) and destination_id (integer) should not appear but the city.name must appear for the users. Each Plan will find both Departure and Destination implicitly and the only corresponding City.name 's must show up on the screen. In order to save the database space, I detach the city name (string) from both departures and destinations, dealing with the connections among them by id's. It works. But I am wondering if there are better ways to do it. The logic becomes rather complex and inevitably the database workload will be troublesome(?), I suppose. So what do you think? soichi -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] How to include html tag inside rails label tag
Hello pls help me, below is my code label style=width:175px;text_align:left;float:left;font-weight:bold;font-size:13px;Group font size=1 color=red*/font/label How to write this html code inside label_tag of rails am clear till font size=1 color=red*/font... label_tag 'Group',nil,:style='width:175px;text_align:left;float:left;font-weight:bold;font-size:13px;' My problem is how to include font size=1 color=red*/font into this label_tag Thanks in advance, Manoj -- 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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.