[Rails] `rails s -e production` loads development database not production

2015-01-20 Thread Jiajia Wang
I'm running into a very weird rails server problem. I started a rails application in production mode with `rails s -e produciton` and got some db errors when visiting the site. Then I realised that it loaded development database not production database. To confirm that, I removed development db

[Rails] Search Bar won't render in TopBar ZURB Foundation

2015-01-20 Thread David Williams
I'm currently using four partials _usernavbar.html.erb _adminnavbar.html.erb _landingnavbar.html.erb _search_box.html.erb <% if user_signed_in? %> <%= render 'navigation_partials/usernavbar' %> <% elsif admin_user_signed_in? %> <%= render 'navigation_partials/adminnavbar' %> <% e

Re: [Rails] how to create a table dynamically in rails 4.without creating model?

2015-01-20 Thread Daynthan Kabilan
Hi Ulaganadhan. This link will help you. https://www.packtpub.com/books/content/designing-and-creating-database-tables-ruby-rails On Tue, Jan 20, 2015 at 10:37 PM, Rajkumar Ulaganadhan wrote: > how to create a table dynamically in rails 4.without creating model? > > -- > You received this mes

[Rails] how to create a table dynamically in rails 4.without creating model?

2015-01-20 Thread Rajkumar Ulaganadhan
how to create a table dynamically in rails 4.without creating model? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegr

[Rails] ActiveJob Coalescing

2015-01-20 Thread Spencer MacDonald
Hi, I was thinking about implementing Apple Push Notifications using ActiveJob, but I would rather have a single "Deliver Notifications" Job in the queue instead of one Job per notification (as Apple don't want you to connect/disconnect) repeatedly. Is there a feature of ActiveJob to coalesce

[Rails] Re: Closures as modules

2015-01-20 Thread Lou Henry Alvarez
5. ANNOUNCING a new release of Jackbox. In this release we primarily wanted to increase the integration with the ruby base and have eliminated the NEED to use inject/enrich although these are still recomended for injectors from a cognitive standpoint. However, injectors now accept and it is now

[Rails] mystery encoding problem sending email

2015-01-20 Thread Scott Ribe
How in the !@#$% can this function: def sendMsg(msg, today, cancel) email =

Re: [Rails] build association and its size issue

2015-01-20 Thread Javix
On Tuesday, 20 January 2015 10:56:09 UTC+1, Colin Law wrote: > > On 20 January 2015 at 09:25, Javix > > wrote: > > > > > > On Tuesday, 20 January 2015 10:15:17 UTC+1, Colin Law wrote: > >> > >> On 20 January 2015 at 09:04, Javix wrote: > >> > I wonder id it is normal behaviour that when b

[Rails] Re: How can I? such as "select max(peak_kw) peak,month from sola_daylies group by month;"

2015-01-20 Thread Winterboum
Thank you, I got it. 2015年1月20日火曜日 5時55分31秒 UTC+9 Daniel Loureiro: > > Try this: > > Sola::Dayly.group(:month).maximum(:peak_kw) > > > *Explanation:* > "find_by_sql" is to be used to get real records, not database > calculations. The "Group", "Max" and other statements produce calculations, >

[Rails] Re: Installing ruby 2.1 and rails 4.2 in centos 7

2015-01-20 Thread Michał Papis
Daniel his RVM is installed in /usr/local/rvm - for this RVM adds a file /etc/profiles.d/rvm.sh so sourcing $HOME/.rvm/scripts/rvm would not help (both scripts prefer $HOME/.rvm) -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubs

Re: [Rails] build association and its size issue

2015-01-20 Thread Colin Law
On 20 January 2015 at 09:25, Javix wrote: > > > On Tuesday, 20 January 2015 10:15:17 UTC+1, Colin Law wrote: >> >> On 20 January 2015 at 09:04, Javix wrote: >> > I wonder id it is normal behaviour that when building an assosiation >> > 'build' >> > method , the returned size of association array

Re: [Rails] build association and its size issue

2015-01-20 Thread Javix
On Tuesday, 20 January 2015 10:15:17 UTC+1, Colin Law wrote: > > On 20 January 2015 at 09:04, Javix > > wrote: > > I wonder id it is normal behaviour that when building an assosiation > 'build' > > method , the returned size of association array changes despite the > objet is > > nt saved y

Re: [Rails] build association and its size issue

2015-01-20 Thread Colin Law
On 20 January 2015 at 09:04, Javix wrote: > I wonder id it is normal behaviour that when building an assosiation 'build' > method , the returned size of association array changes despite the objet is > nt saved yet ? Here is a short exampe to illustrate that: > > class User < ActiveRecord::Base >

[Rails] build association and its size issue

2015-01-20 Thread Javix
I wonder id it is normal behaviour that when building an assosiation 'build' method , the returned size of association array changes despite the objet is nt saved yet ? Here is a short exampe to illustrate that: class User < ActiveRecord::Base has_many :posts, dependent: :destroy end class