Re: [Rails] Finding out if a X Time Zone is in midnight

2014-03-24 Thread Colin Law
On 24 March 2014 04:20, Saurav Chakraborty wrote: > Hello Guys, > > I am working on scheduler module for which I want to know, if any X time > zone is in mid night now ? I, for one, do not understand your question. Can you clarify please. Colin -- You received this message because you are sub

Re: [Rails] Finding out if a X Time Zone is in midnight

2014-03-24 Thread Abdulsattar Mohammed
It'll be the UTC - (current time in UTC). For example, if the current time is 8:00 AM UTC, then the UTC -8:00 will be the timezone that will be midnight at that instant. On Mon, Mar 24, 2014 at 2:04 PM, Colin Law wrote: > On 24 March 2014 04:20, Saurav Chakraborty wrote: > > Hello Guys, > > >

Re: [Rails] If you were to code a marketplace app like AirBnB today, what technology & stack would you use?

2014-03-24 Thread Andreas Wenk
Brandon, why not using PostgreSQL? Hosting: EngineYard https://www.engineyard.com/ SCM: git Cheers Andy On Saturday, March 22, 2014 3:27:45 PM UTC+1, Karthikeyan A K wrote: > > Oops that must be ember not embe :( > > On Saturday 22 March 2014 07:55 PM, Karthikeyan A K wrote: > > I am an Emb

[Rails] order_query finds next / previous Active Record(s) in one query

2014-03-24 Thread Gleb Mazovetskiy
order_query order_query gives you next or previous records relative to the current one efficiently. For example, you have a list of items, sorted by priority. You have 10,000 items! If you are showing the user a single item, how do you provide buttons for the user to see the previous item or the

Re: [Rails] If you were to code a marketplace app like AirBnB today, what technology & stack would you use?

2014-03-24 Thread Karthikeyan A K
+1 for postgre Engine yard costs, better go for Digital Ocean or Linode On Mon, Mar 24, 2014 at 2:49 PM, Andreas Wenk wrote: > Brandon, > > why not using PostgreSQL? > > Hosting: EngineYard https://www.engineyard.com/ > SCM: git > > Cheers > > Andy > > > On Saturday, March 22, 2014 3:27:45 PM U

[Rails] Not able to find the ruby file in command prompt with ruby and rails

2014-03-24 Thread S Punitha
Why am i not able to run win_fetch_cacerts.rb ruby file thats there in my desktop? :\ C:\Users\punitha\aggregator>ruby "%USERPROFILE%\Desktop\win_fetch_cacerts.rb" ruby: No such file or directory -- C:/Users/punitha/Desktop/win_fetch_cacerts.rb(LoadError) -- You received this message because

Re: [Rails] If you were to code a marketplace app like AirBnB today, what technology & stack would you use?

2014-03-24 Thread Andreas Wenk
DigitalOcean is cool I gues - but it still costs :) here is a good comparison of the various service providers https://www.digitalocean.com/competitor-pricing/ On Monday, March 24, 2014 2:02:25 PM UTC+1, Karthikeyan A K wrote: > > +1 for postgre > Engine yard costs, better go for Digital Ocean

Re: [Rails] If you were to code a marketplace app like AirBnB today, what technology & stack would you use?

2014-03-24 Thread Brandon
Andy, trying to do something new to expand my skills and knowledge so not using PostgreSQL. Karthikeyan, thanks will look into it. I know it may sound crazy to do everything completely different from the current project but feeling programatically inadequate lately after switching to Rails.. Fe

[Rails] "class Admin::UsersController < ApplicationController". What does the double colon do here?

2014-03-24 Thread Brandon
I saw this on a Gem implementation and don't understand why it needed "::UsersController" at all. My understanding that it is trying to find the relative path of UsersController, but why is it necessary to be there? -- You received this message because you are subscribed to the Google Groups "

Re: [Rails] What is your style? ':this_style =>' vs 'this_style:' or depends?

2014-03-24 Thread Brandon
Visually I find the hash rocket style really unnerving.. I don't know why! Just like the "<<" which is supposed to be more efficient than "+". Just pains me to see them but I'm trying to adhere to best practices too. On Friday, March 21, 2014 11:51:14 AM UTC+8, tamouse wrote: > > On Thu, Mar 20,

Re: [Rails] Not able to find the ruby file in command prompt with ruby and rails

2014-03-24 Thread Colin Law
On 24 March 2014 13:22, S Punitha wrote: > > > Why am i not able to run win_fetch_cacerts.rb ruby file thats there in > my desktop? :\ > > C:\Users\punitha\aggregator>ruby "%USERPROFILE%\Desktop\win_fetch_cacerts.rb" > ruby: No such file or directory -- > C:/Users/punitha/Desktop/win_fetch_cace

[Rails] Use a module for this?

2014-03-24 Thread Dave Castellano
Hi, I have some code that has to be used by more than one method in the same class. Would I create a module for this or is there a better way? eg. module QuestionSequencer class Sequence def sequence_questions initial_now_playing_length = play_list[0].length now_playing = play_l

Re: [Rails] Use a module for this?

2014-03-24 Thread Colin Law
On 24 March 2014 18:56, Dave Castellano wrote: > Hi, > > I have some code that has to be used by more than one method in the same > class. Would I create a module for this or is there a better way? > ... > in method: > now_playing = play_list.sequence_questions > in model: > include Que

[Rails] Re: Use a module for this?

2014-03-24 Thread Dave Castellano
Is play_list an instance of a model? If so then why is sequence_questions not just a method of the model? Colin Yes it is. I'll try that now. Thank you. Dave Castellano -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "

[Rails] Re: Use a module for this?

2014-03-24 Thread Dave Castellano
Dave Castellano wrote in post #1140813: > Is play_list an instance of a model? If so then why is > sequence_questions not just a method of the model? > > Colin > > Yes it is. I'll try that now. > > Thank you. > > Dave Castellano Well, maybe... Here is the code, te question is is it an instance

Re: [Rails] Re: Use a module for this?

2014-03-24 Thread Colin Law
On 24 March 2014 22:12, Dave Castellano wrote: > Dave Castellano wrote in post #1140813: >> Is play_list an instance of a model? If so then why is >> sequence_questions not just a method of the model? >> >> Colin >> >> Yes it is. I'll try that now. >> >> Thank you. >> >> Dave Castellano > > Well

[Rails] Re: Re: Use a module for this?

2014-03-24 Thread Dave Castellano
> > Do not make us wade through lots of code trying to understand what is > going on. Explain the problem and show us just a few lines of code if > necessary. For instance of what type is play_list? You said it was > an instance of a model, but it seems to be an array or collection of > some sor

Re: [Rails] If you were to code a marketplace app like AirBnB today, what technology & stack would you use?

2014-03-24 Thread Karthikeyan A K
Not exactly, Ember brings a framework to the client side, just like Ruby on Rails is a frame work to server side. You can try this gem https://github.com/dockyard/ember-appkit-rails Though the your view of client side of application may change after using ember, the server side will still be i

[Rails] Kitchen Designer London

2014-03-24 Thread Positively Positively
Kitchen Designer London. Thirty Ex Display Kitchens To Clear. ww w . e x d is p la y k i t c h e n s 1 . c o. u k £ 595 Each with appliances. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. T