Re: [Rails] Installing RVM Problems

2013-07-19 Thread Tamara Temple
On Jul 19, 2013, at 9:03 AM, Jayant S. wrote: > I do not explicitly use zsh, but I also do not know if at any point, my > terminal will need to do so. I googled the error message and another > github link came up from you, Michal Papis: > https://github.com/wayneeseguin/rvm/issues/2029, where

[Rails] Re: Normalize dates taht are entered in more then one way.

2013-07-19 Thread Andrew Vit
The standard Date class can do parsing for some basic formats: Date.parse('2000-11-22') Date.parse('11-22-2000') Date.parse('1-2-2000') Date.parse('11/22/2000') Date.parse('22/11/2000') Date.parse('20001122') But you should probably expect input that will be ambiguous. I'm not sure how you want

[Rails] Re: Delayed job in Rails 4

2013-07-19 Thread Fernando Irias
Got this working by using the Git version of both, delayed_job and delayed_job_active_record. In your Gemfile: gem 'delayed_job', git: 'git://github.com/collectiveidea/delayed_job.git' gem 'delayed_job_active_record', git: 'git://github.com/collectiveidea/delayed_job_active_record.git'

[Rails] Re: Delayed job in Rails 4

2013-07-19 Thread Fernando Irias
Looks like still no update for delayed_job_active_record. Does anyone have news on this? -- 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 unsubscribe from this group and stop receiving emails

Re: [Rails] Installing RVM Problems

2013-07-19 Thread Tamara Temple
On Jul 19, 2013, at 12:47 AM, Jayant S. wrote: > apt-get are only for linux machines, and I am currently operating on a > Mac OSX. And for oh_my_zsh one needs a zsh of 4.3.9, but mine is > currently at 4.3.11. All I need is 4.3.12-5.0.0+ zsh in order to run RVM > without errors, or at least that

Re: [Rails] Laying out the flow of an application - where to start?

2013-07-19 Thread Tamara Temple
On Jul 19, 2013, at 7:15 AM, Chris Sciolla wrote: > @tamouse_m, thank for your insight. Those are great questions and I'll > be sure to note them. So here are the best answers I have. In this > particular situation, users are visiting static pages of information. > There are no real dynamic t

Re: [Rails] Laying out the flow of an application - where to start?

2013-07-19 Thread Tamara Temple
On Jul 19, 2013, at 8:41 AM, chris sc wrote: > I guess I just need to wrap my head around associations. That's what > I've been reading more about and it seems like it's taking me down the > right path. What I'm still confused about, is how to separate the admin > side from the user side. I know

Re: [Rails] Rails 4 "belongs_to: record" association doesn't work

2013-07-19 Thread Tamara Temple
On Jul 19, 2013, at 7:15 AM, Robert Walker wrote: > Colin Law wrote in post #1116001: >> On 19 July 2013 14:59, David wrote: >>> Yes exactly. It's specific to the word 'record'. It works when I change it >>> to :foo or :b (or anything else). >>> >>> Are there any reserved words for association

[Rails] Re: Laying out the flow of an application - where to start?

2013-07-19 Thread Joel Pearson
I think when you say "static" html for the pages, you really want dynamically generated content. You need a simple template which presents the requested information with links up and down the chain. The first thing you need to do, particularly if you have data to start off with, is sort out the

[Rails] Best practices for capybara's features spec?

2013-07-19 Thread Guirec Corbel
Hi, I realy like to use capybara's features spec but I have some questions about the organisation : 1. How should I group the features specs? - For the moment, I try to group by controllers. For example, I can have a file "users_spec.rb", "artists_spec.rb"

Re: [Rails] Rails 4 "belongs_to: record" association doesn't work

2013-07-19 Thread Walter Lee Davis
On Jul 19, 2013, at 12:17 PM, Colin Law wrote: > Could I suggest you make the title "Reserved Words in Ruby on Rails" Done and done. Walter -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiv

[Rails] Refactor a view by a decorator, a presenter, an helper or something else?

2013-07-19 Thread Guirec Corbel
Hi, In a view, I have this code : <% MeasureUnitDecorator.all.each do |mu| %> Dimensions in <%= mu.title %> : <%= painting.convert(:width, mu) %> x <%= painting.convert(:height, mu) %> <% if painting.depth %> x <%= painting.convert(:depth, mu) %> <% end

[Rails] Re: Installing RVM Problems

2013-07-19 Thread Jayant S.
I do not explicitly use zsh, but I also do not know if at any point, my terminal will need to do so. I googled the error message and another github link came up from you, Michal Papis: https://github.com/wayneeseguin/rvm/issues/2029, where you commented that there is no way to tell if a user is

Re: [Rails] Re: Rails 4 "belongs_to: record" association doesn't work

2013-07-19 Thread Colin Law
On 19 July 2013 15:15, Robert Walker wrote: > Colin Law wrote in post #1116001: >> On 19 July 2013 14:59, David wrote: >>> Yes exactly. It's specific to the word 'record'. It works when I change it >>> to :foo or :b (or anything else). >>> >>> Are there any reserved words for association names? >

Re: [Rails] Re: Rails 4 "belongs_to: record" association doesn't work

2013-07-19 Thread Colin Law
On 19 July 2013 15:24, David wrote: > It would be weird if there are some reserved words for association names... > and they are not documented. It may well be reserved in other situations also. No reserved words are documented as far as I know. Colin > > > On Friday, July 19, 2013 4:15:14 PM

Re: [Rails] Rails 4 "belongs_to: record" association doesn't work

2013-07-19 Thread Colin Law
On 19 July 2013 17:02, Walter Lee Davis wrote: > > On Jul 19, 2013, at 11:41 AM, Colin Law wrote: > >> On 19 July 2013 15:24, David wrote: >>> It would be weird if there are some reserved words for association names... >>> and they are not documented. >> >> It may well be reserved in other situat

[Rails] Re: Laying out the flow of an application - where to start?

2013-07-19 Thread chris sc
I guess I just need to wrap my head around associations. That's what I've been reading more about and it seems like it's taking me down the right path. What I'm still confused about, is how to separate the admin side from the user side. I know there are gems for this, but I want to understand the l

Re: [Rails] Re: Laying out the flow of an application - where to start?

2013-07-19 Thread Colin Law
On 19 July 2013 15:15, Chris Sciolla wrote: > @tamouse_m, thank for your insight. Those are great questions and I'll > be sure to note them. So here are the best answers I have. In this > particular situation, users are visiting static pages of information. > There are no real dynamic tasks involv

[Rails] Re: Rails 4 "belongs_to: record" association doesn't work

2013-07-19 Thread David
It would be weird if there are some reserved words for association names... and they are not documented. On Friday, July 19, 2013 4:15:14 PM UTC+2, Ruby-Forum.com User wrote: > > Colin Law wrote in post #1116001: > > On 19 July 2013 14:59, David > wrote: > >> Yes exactly. It's specific to the

[Rails] Re: Rails 4 "belongs_to: record" association doesn't work

2013-07-19 Thread Robert Walker
Colin Law wrote in post #1116001: > On 19 July 2013 14:59, David wrote: >> Yes exactly. It's specific to the word 'record'. It works when I change it >> to :foo or :b (or anything else). >> >> Are there any reserved words for association names? > > It would appear that the answer to that question

[Rails] Re: Laying out the flow of an application - where to start?

2013-07-19 Thread Chris Sciolla
@tamouse_m, thank for your insight. Those are great questions and I'll be sure to note them. So here are the best answers I have. In this particular situation, users are visiting static pages of information. There are no real dynamic tasks involved, just browsing pages and subpages. In this ca

Re: [Rails] Rails 4 "belongs_to: record" association doesn't work

2013-07-19 Thread Colin Law
On 19 July 2013 14:59, David wrote: > Yes exactly. It's specific to the word 'record'. It works when I change it > to :foo or :b (or anything else). > > Are there any reserved words for association names? It would appear that the answer to that question is yes. Colin > > On Friday, July 19, 201

Re: [Rails] Rails 4 "belongs_to: record" association doesn't work

2013-07-19 Thread David
Yes exactly. It's specific to the word 'record'. It works when I change it to :foo or :b (or anything else). Are there any reserved words for association names? On Friday, July 19, 2013 3:38:57 PM UTC+2, Colin Law wrote: > > On 19 July 2013 11:32, David > wrote: > > Hi, > > > > I discovered a

[Rails] Re: Combine two apps into one? Engines?

2013-07-19 Thread Josh Jordan
I think you're on the right track. It sounds like your views are not properly scoped to the engine, or you're trying to call routes from the engine that it doesn't know about. Can you try qualifying the routes with the application/engine they came from? See here: http://guides.rubyonrails.org/e

Re: [Rails] Rails 4 "belongs_to: record" association doesn't work

2013-07-19 Thread Colin Law
On 19 July 2013 11:32, David wrote: > Hi, > > I discovered a weird behavior when using a "belongs_to: record" association > in Rails 4. > > Given two models A and B: > > class A < ActiveRecord::Base > belongs_to :record, class_name: 'B', foreign_key: 'b_id' > end > > class B < ActiveRecord::Base

Re: [Rails] Normalize dates taht are entered in more then one way.

2013-07-19 Thread Colin Law
On 18 July 2013 15:35, Mark Kenney wrote: > Hi all, > > I'm looking for a function, gem, etc. that will help to unify dates as they > come in different formats. If the date comes in > (1/2/2012,2012-01-02,01-02-2012,20120102,01022012, etc.) it would be nice to > have it come out 2012-01-02. I've s

Re: [Rails] Re: webpage has a redirect loop error pls help me

2013-07-19 Thread Colin Law
On 19 July 2013 10:48, muthu b. wrote: > muthu b. wrote in post #1115772: >> Thank you for your reply. I have hosted my site in site5 and phusion >> passenger is already installed. >> And my error is when i access my webpage it shows >> this webpage has a redirect loop. The site has been redirecte

Re: [Rails] Re: Ajax Search

2013-07-19 Thread Thiago Cifani
Hey man, What's up? I read you email, and a fast way to solve this problem is putting a remote true in your search form, you can easily render a partial, maybe called _products.html.erb on callback view, something as index.js.erb. So, your action will be the same but will respond to js and html

[Rails] Re: Reusing functional tests with rails 4

2013-07-19 Thread Robert Walker
J. mp wrote in post #1115983: > I want to run both test for each of the role (Merchant or FrontStore) > but > not repeating the test code. > > My question is, how best design the test so they are reusable in this > case? IMHO you shouldn't. Test code should be DAMP not DRY: http://stackoverflow.c

[Rails] Re: Installing RVM Problems

2013-07-19 Thread Michał Papis
This messages is intended only for Zsh users -> "In case of using Zsh" - so if you do not use Zsh you can ignore it I have also changed the message to explain it better: https://github.com/wayneeseguin/rvm/compare/c26ce19312f3...0d581bccc6a3 On Friday, July 19, 2013 8:11:11 AM UTC+2, Ruby-Forum

[Rails] Reusing functional tests with rails 4

2013-07-19 Thread João Pereira
With rails 4, I have this test for one controller: class Merchant::RegistrationsControllerTest < ActionController::TestCase test "should create new registration" do user = FactoryGirl.build(:merchant_user) #rest of the test using user as input for the controler end test "should n

[Rails] Re: How to assert the value of an input element with assert_select (Rails 4)

2013-07-19 Thread João Pereira
Will try that. Thanks On Friday, July 19, 2013 1:18:33 PM UTC+2, Frederick Cheung wrote: > > > > On Thursday, July 18, 2013 11:53:01 AM UTC+1, João Pereira wrote: >> >> Given this HTML in the view: >> >> How do I select the value of the button with assert_select? I try >> >> assert_select 'form in

[Rails] Re: How to assert the value of an input element with assert_select (Rails 4)

2013-07-19 Thread Frederick Cheung
On Thursday, July 18, 2013 11:53:01 AM UTC+1, João Pereira wrote: > > Given this HTML in the view: > > How do I select the value of the button with assert_select? I try > > assert_select 'form input[type=submit]', "Send Reset Instructions" > > > This checks whether the input element contains that

[Rails] How to assert the value of an input element with assert_select (Rails 4)

2013-07-19 Thread João Pereira
Given this HTML in the view: Recover Pasword How do I select the value of the button with assert_select? I try assert_select 'form input[type=submit]', "Send Reset Instructions" but its failing with expected but was <>.. Expected 0 to be >= 1. Basical

[Rails] Normalize dates taht are entered in more then one way.

2013-07-19 Thread Mark Kenney
Hi all, I'm looking for a function, gem, etc. that will help to unify dates as they come in different formats. If the date comes in (1/2/2012,2012-01-02,01-02-2012,20120102,01022012, etc.) it would be nice to have it come out 2012-01-02. I've searched for a few days and only find ways to conve

[Rails] Rails 4 "belongs_to: record" association doesn't work

2013-07-19 Thread David
Hi, I discovered a weird behavior when using a "belongs_to: record" association in Rails 4. Given two models A and B: class A < ActiveRecord::Base belongs_to :record, class_name: 'B', foreign_key: 'b_id' end class B < ActiveRecord::Base end When creating A, it inserts a record in B and retu

[Rails] url_helpers in /lib

2013-07-19 Thread Nicholas Wieland
Hi, I'm trying to generate some static feeds using a script in /lib that I will later call from a sidekiq worker and I need to access the URL helpers from my library, how can I do it? What I tried so far is including Rails.application.routes.url_helpers in my class but it doesn't seem to work. I

[Rails] Re: Installing RVM Problems

2013-07-19 Thread Rick
On Friday, July 19, 2013 6:42:44 AM UTC-4, Rick wrote: > > > > On Friday, July 19, 2013 3:47:49 AM UTC-4, Ruby-Forum.com User wrote: >> >> apt-get are only for linux machines, and I am currently operating on a >> Mac OSX. And for oh_my_zsh one needs a zsh of 4.3.9, but mine is >> currently at 4

[Rails] Re: Installing RVM Problems

2013-07-19 Thread Rick
On Friday, July 19, 2013 3:47:49 AM UTC-4, Ruby-Forum.com User wrote: > > apt-get are only for linux machines, and I am currently operating on a > Mac OSX. And for oh_my_zsh one needs a zsh of 4.3.9, but mine is > currently at 4.3.11. All I need is 4.3.12-5.0.0+ zsh in order to run RVM > witho

[Rails] Re: webpage has a redirect loop error pls help me

2013-07-19 Thread muthu b.
muthu b. wrote in post #1115772: > Thank you for your reply. I have hosted my site in site5 and phusion > passenger is already installed. > And my error is when i access my webpage it shows > this webpage has a redirect loop. The site has been redirected to > www.technoadmin.com/user/dashboard but

Re: [Rails] Re: Ajax Search

2013-07-19 Thread avinash behera
I have tried with that. There are more than 3000 records. So datatable is taking time to load every time page refreshes unlike kaminari. On Fri, Jul 19, 2013 at 2:18 PM, Rajesh reddy wrote: > Hi Avinash, > > Instead of Kaminari gem try Jquery datatables it gives u default > pagination, search, a

[Rails] Re: Ajax Search

2013-07-19 Thread Rajesh reddy
Hi Avinash, Instead of Kaminari gem try Jquery datatables it gives u default pagination, search, and sort features you can customize it according to your needs Regards, Rajesh On Friday, July 19, 2013 11:15:30 AM UTC+5:30, Avi wrote: > > Hello All, > > I am using Kaminari gem for pagination. >

[Rails] Re: Installing RVM Problems

2013-07-19 Thread Jayant S.
apt-get are only for linux machines, and I am currently operating on a Mac OSX. And for oh_my_zsh one needs a zsh of 4.3.9, but mine is currently at 4.3.11. All I need is 4.3.12-5.0.0+ zsh in order to run RVM without errors, or at least thats what the prompt intimates. -- Posted via http://www.ru

Re: [Rails] Installing RVM Problems

2013-07-19 Thread Tamara Temple
On Jul 18, 2013, at 11:11 PM, Jayant S. wrote: > How do I update my zsh if I am getting the error message, ” WARNING: In > case of using Zsh, version 4.3.12 / 5.0.0+ is recommended, you have > 4.3.11, errors to be expected.” when installing RVM? I am new to > developing with Ruby and the Ruby co

Re: [Rails] help regarding internationalization for bootstrap button.

2013-07-19 Thread Tamara Temple
On Jul 18, 2013, at 1:51 AM, Tushar Patil wrote: > Hi, > Here i mention my hi.bootstrap.yml file, and i use > create company => key use in form.html > > <%= f.submit t('.create company', :default => t("helpers.links.Create > Company")), :class => 'btn btn-primary' %> > > It works fine for H

Re: [Rails] What would be a good hosting plan for hosting several Rails projects?

2013-07-19 Thread Tamara Temple
On Jul 18, 2013, at 3:27 AM, Walter Lee Davis wrote: > > On Jul 18, 2013, at 3:35 AM, Nico S. wrote: > >> I come from the ASP.NET world where I used to get a shared hosting plan >> at a host and simply deployed various projects to different folders via >> FTP, assigning various domain names to

Re: [Rails] Laying out the flow of an application - where to start?

2013-07-19 Thread Tamara Temple
On Jul 17, 2013, at 11:45 AM, Chris Sciolla wrote: > Hi all, first post! I have a question regarding where to start with a > particular app I'm building. Hoping someone can set me on the right > path. The scenario is pretty straight forward. > This is the hierarchy of info: > > States > Towns >