Re: [Rails] conditional layout question ? sidebar visible on all pages except the login page.

2014-08-14 Thread Roelof Wobben
then I see this error message ; undefined local variable or method `“sidebar”' for ##Class:0x007fc6a2ce9c38:0x007fc6a50d7118 Where I have a sidebar.html.erb and a _sidebar.html.erb in the same directory. Roelof Op woensdag 13 augustus 2014 22:06:47 UTC+2 schreef Eric Saupe: You still

[Rails] [Error][Rails 4] Undefined method `attr_accessible'

2014-08-14 Thread Ricardo Liyushiro Chikasawa
Hi Guy, *I'm a* * beginner with Ruby on Rails.*I insert new colum *rails generate migration add_premium_to_jobs premium:boolean* after *rake db:migrate* And add in model - job.rb ,the attribute* attr_accessible :premium* Console error : *undefined method `attr_accessible'* Can Help me?

[Rails] Issue with hstore returning as string on postgres database, rails app

2014-08-14 Thread Zeb Haradon
Summary: rails app using postgres randomly gets into a state where hstore array is returned as a string, and cannot be fixed without rebuilding the database We have an app using rails 4.04 with ruby 1.9.3, postgres database version 9.2.6. Every day, in the test environment, we drop the

[Rails] Re: RestClient and passing cookies

2014-08-14 Thread Frederick Cheung
On Tuesday, August 12, 2014 9:36:59 PM UTC+1, Ruby-Forum.com User wrote: #the second post (below) will fail because of the missing cookie variable restexec_adduser= RestClient.post(url_adduser,payload_adduser,initheader_add_user) END CODE == How can I pass the cookie

[Rails] Re: [Error][Rails 4] Undefined method `attr_accessible'

2014-08-14 Thread Frederick Cheung
On Wednesday, August 13, 2014 9:23:53 PM UTC+1, Ricardo Liyushiro Chikasawa wrote: And add in model - job.rb ,the attribute* attr_accessible :premium* Console error : *undefined method `attr_accessible'* Can Help me? attr_accessible and attr_protected were removed in rails 4. You can

[Rails] Need help for Resque job.

2014-08-14 Thread betterabhi .
Hi Friends, I have a scenario where I am calling a resque jobs within the resque job which is already initiated. The below mentioned infinite code is just a example: The code will executed till all the jobs are not completed. BUT the issue is that when I write the below code the jobs never

[Rails] No routes match to action

2014-08-14 Thread Fernando Aureliano
Hi guys! I'm doing a shopping cart with the gem: gem act_as_shopping_cart ( https://github.com/crowdint/acts_as_shopping_cart) This gem do not have a good documentation, butis popular. in my action add_item I'm getting the error: No route matches {:action=add_item, :id=nil,

Re: [Rails] No routes match to action

2014-08-14 Thread Colin Law
On 14 August 2014 12:14, Fernando Aureliano m...@fernandoaureliano.com wrote: Hi guys! I'm doing a shopping cart with the gem: gem act_as_shopping_cart (https://github.com/crowdint/acts_as_shopping_cart) This gem do not have a good documentation, butis popular. in my action add_item I'm

Re: [Rails] conditional layout question ? sidebar visible on all pages except the login page.

2014-08-14 Thread James Davis, PhD
Add the folder name where your sidebar partial is located. %= render “layouts/sidebar” unless current_page?(new_admin_session_path) % On Thursday, August 14, 2014 1:16:05 AM UTC-5, Roelof Wobben wrote: then I see this error message ; undefined local variable or method `“sidebar”' for

Re: [Rails] No routes match to action

2014-08-14 Thread Fernando Aureliano
My routes is like that: get entrar/index devise_for :users devise_scope :user do get login, to: devise/sessions#new get sair = devise/sessions#destroy get registrar = devise/registrations#new get cadastrar = devise/invitations#new get 'perfil' =

Re: [Rails] No routes match to action

2014-08-14 Thread Fernando Aureliano
Should I put some extra route for my action add_item in my routes? Em quinta-feira, 14 de agosto de 2014 08h15min17s UTC-3, Fernando Aureliano escreveu: Hi guys! I'm doing a shopping cart with the gem: gem act_as_shopping_cart ( https://github.com/crowdint/acts_as_shopping_cart) This

Re: [Rails] No routes match to action

2014-08-14 Thread Colin Law
On 14 August 2014 13:52, Fernando Aureliano m...@fernandoaureliano.com wrote: Should I put some extra route for my action add_item in my routes? Yes, otherwise you will get 'no route matches' because there is not one specified. You can run rake routes to all the routes that you have specified.

Re: [Rails] conditional layout question ? sidebar visible on all pages except the login page.

2014-08-14 Thread Roelof Wobben
undefined local variable or method `“layouts' for ##Class:0x007f50394a0340:0x007f503949ded8 Roelof Op donderdag 14 augustus 2014 13:54:36 UTC+2 schreef James Davis, PhD: Add the folder name where your sidebar partial is located. %= render “layouts/sidebar” unless

Re: [Rails] No routes match to action

2014-08-14 Thread Fernando Aureliano
Thanks man! How I could declare the route for this action? Em quinta-feira, 14 de agosto de 2014 08h15min17s UTC-3, Fernando Aureliano escreveu: Hi guys! I'm doing a shopping cart with the gem: gem act_as_shopping_cart ( https://github.com/crowdint/acts_as_shopping_cart) This gem do

Re: [Rails] No routes match to action

2014-08-14 Thread Fernando Aureliano
Thank you! I did: post comprar/:id = comprar#add_item and seens to work! But everything I put inside the % form_for @cart, :url = {:action = add_item, :id = @cart.id} do |f| % is not showing in the view. I even look for with element inspector, but the form for is not rendering what is

Re: [Rails] conditional layout question ? sidebar visible on all pages except the login page.

2014-08-14 Thread Colin Law
On 14 August 2014 14:10, Roelof Wobben rwob...@hotmail.com wrote: undefined local variable or method `“layouts' for ##Class:0x007f50394a0340:0x007f503949ded8 Show us the line of code that error is generated on (with a couple of lines each side). Copy/paste it here. Colin Roelof Op

Re: [Rails] conditional layout question ? sidebar visible on all pages except the login page.

2014-08-14 Thread Roelof Wobben
Here is the whole layout : !DOCTYPE html html lang=en head meta http-equiv=Content-Type content=text/html; charset=utf-8 meta name=viewport content=width=device-width, initial-scale=1.0 titleLiberator Admin Theme/title link rel=apple-touch-icon sizes=144x144

Re: [Rails] conditional layout question ? sidebar visible on all pages except the login page.

2014-08-14 Thread Colin Law
On 14 August 2014 16:21, Roelof Wobben rwob...@hotmail.com wrote: Here is the whole layout : Look at the stack trace and find which line of your code generated the error, then post just that section. Colin -- You received this message because you are subscribed to the Google Groups Ruby on

Re: [Rails] conditional layout question ? sidebar visible on all pages except the login page.

2014-08-14 Thread Roelof Wobben
I think you mean this : Processing by DashboardController#show as HTML Rendered dashboard/show.html.erb within layouts/application

Re: [Rails] conditional layout question ? sidebar visible on all pages except the login page.

2014-08-14 Thread Hassan Schroeder
On Thu, Aug 14, 2014 at 10:10 AM, Roelof Wobben rwob...@hotmail.com wrote: ActionView::Template::Error (undefined local variable or method `“layouts' for ##Class:0x007f6269e4a548:0x007f6269e49080): 21: %= render “layouts/sidebar” unless current_page?(new_admin_session_path) %

Re: [Rails] Issue with hstore returning as string on postgres database, rails app

2014-08-14 Thread Hassan Schroeder
On Wed, Aug 13, 2014 at 2:32 PM, Zeb Haradon zebhara...@gmail.com wrote: Summary: rails app using postgres randomly gets into a state where hstore array is returned as a string, and cannot be fixed without rebuilding the database Not that familiar with (or fond of) postgres, but curious --

[Rails] Re: begginer , need help with ruby installation(cmd)

2014-08-14 Thread Joel Witherspoon
I wouldn't recommend CMD on Windows. Use GITBASH instead. It works really well and uses *nix commands like the books. Open one GiTBash instance for running your Rails server and the other for any of your functions. http://installrails.com/ really helped get me going. Don't forget your sanity

[Rails] cannot load such file -- config/boot (LoadError)

2014-08-14 Thread Rafael Soufraz
Hi folks, I had installed an ubuntu server redmine 12:04 I decided to upgrade to the new version redmine. After following all the steps in this tutorial: http://www.keopx.net/blog/howto-install-redmine-242-ubuntu-1204-lts I am getting the below error message. How to proceed?

Re: [Rails] conditional layout question ? sidebar visible on all pages except the login page.

2014-08-14 Thread Roelof Wobben
Thanks,, Im using the ide of nitrious.io but this is the next problem that arise with wrong characters. I think I will look for a decent Linux distro and look then for a solution where I can have all the files at one window. my code in another and a terminal as a footer. Roelof Op

Re: [Rails] conditional layout question ? sidebar visible on all pages except the login page.

2014-08-14 Thread Colin Law
On 14 August 2014 18:18, Hassan Schroeder hassan.schroe...@gmail.com wrote: On Thu, Aug 14, 2014 at 10:10 AM, Roelof Wobben rwob...@hotmail.com wrote: ActionView::Template::Error (undefined local variable or method `“layouts' for ##Class:0x007f6269e4a548:0x007f6269e49080): 21: %=

[Rails] Can't mass-assign protected attributes: item

2014-08-14 Thread Fernando Aureliano
Hi! I'm using the version of that gem https://github.com/crowdint/acts_as_shopping_cart for rails 3 I did evething with ythe convetions names. But I'm getting the error Can't mass-assign protected attributes: item class ShoppingCartsController ApplicationController before_filter

[Rails] Re: Can't mass-assign protected attributes: item

2014-08-14 Thread Eric Saupe
Quick Google search brought up http://railscasts.com/episodes/26-hackers-love-mass-assignment and this StackOverflow question, http://stackoverflow.com/questions/6163759/cant-mass-assign-protected-attributes. On Thursday, August 14, 2014 3:31:12 PM UTC-6, Fernando Aureliano wrote: Hi! I'm

[Rails] Re: Can't mass-assign protected attributes: item

2014-08-14 Thread Fernando Aureliano
Hi! Thanks! but if you read the code below, you gonna see that my code is already have *attr_accessible *for all items. Em quinta-feira, 14 de agosto de 2014 18h31min12s UTC-3, Fernando Aureliano escreveu: Hi! I'm using the version of that gem

Re: [Rails] No routes match to action

2014-08-14 Thread Walter Lee Davis
On Aug 14, 2014, at 9:44 AM, Fernando Aureliano wrote: Thank you! I did: post comprar/:id = comprar#add_item and seens to work! But everything I put inside the % form_for @cart, :url = {:action = add_item, :id = @cart.id} do |f| % is not showing in the view. I even look for with

[Rails] how can a user contact another user

2014-08-14 Thread Friederike Geiken
I think this is a rather general question. I would like to implement the following function in my website: Users can create different listings. Other user can click on the listing and click a contact button that links to a contact form. Here, users can send the listing user a message. Does anyone

[Rails] how can a user contact another user

2014-08-14 Thread Friederike Geiken
I think this is a rather general question. I would like to implement the following function in my website: Users can create different listings. Other user can click on the listing and click a contact button that links to a contact form. Here, users can send the listing user a message. Does anyone

[Rails] What is the question mark inside this regex doing?

2014-08-14 Thread 'John Merlino' via Ruby on Rails: Talk
I thought the ? matches zero or one occurrence of a pattern. However in this example: def show_regexp(string, pattern) match = pattern.match(string) if match #{match.pre_match}-#{match[0]}-#{match.post_match} else no match end end a = The moon is made of cheese show_regexp(a,