Re: [Rails] Issue with passing parameter to action using link_to

2012-11-29 Thread Jim Ruther Nill
On Fri, Nov 30, 2012 at 2:50 PM, sumit srivastava < sumit.theinvinci...@gmail.com> wrote: > Verified it. Don't have puts anywhere else. > ok. sorry but I ran out of ideas. without looking at the logs or the whole code, i won't be able to help. > > Regards > Sumit Srivastava > > The power of i

Re: [Rails] Why did we include assets folder in Vendor, Public, lib directorys ?

2012-11-29 Thread Jim Ruther Nill
On Fri, Nov 30, 2012 at 2:45 PM, Fahim Patel wrote: > Hi > > As per i know assets folder is include in app directory . > And when we do asset pre compile than assets folder created in public > folder. > > Q But what is use of assets folder in vendor and lib directory' s ? > I think it's mainly

Re: [Rails] Issue with passing parameter to action using link_to

2012-11-29 Thread sumit srivastava
Verified it. Don't have puts anywhere else. Regards Sumit Srivastava The power of imagination makes us infinite... On 30 November 2012 11:39, Jim Ruther Nill wrote: > > > > On Fri, Nov 30, 2012 at 1:50 PM, sumit srivastava < > sumit.theinvinci...@gmail.com> wrote: > >> If it were being direct

[Rails] Why did we include assets folder in Vendor, Public, lib directorys ?

2012-11-29 Thread Fahim Patel
Hi As per i know assets folder is include in app directory . And when we do asset pre compile than assets folder created in public folder. Q But what is use of assets folder in vendor and lib directory' s ? Thanks Fahim -- You received this message because you are subscribed to the Google

Re: [Rails] Issue with passing parameter to action using link_to

2012-11-29 Thread Jim Ruther Nill
On Fri, Nov 30, 2012 at 1:50 PM, sumit srivastava < sumit.theinvinci...@gmail.com> wrote: > If it were being directed to some other action, then *** > should not have been printed. And when I am trying to access this parameter > from the view "index.html.haml", its value is printed exa

Re: [Rails] Issue with passing parameter to action using link_to

2012-11-29 Thread sumit srivastava
If it were being directed to some other action, then *** should not have been printed. And when I am trying to access this parameter from the view "index.html.haml", its value is printed exactly what is being passed. Regards Sumit Srivastava The power of imagination makes us infinite.

Re: [Rails] Issue with passing parameter to action using link_to

2012-11-29 Thread Jim Ruther Nill
On Fri, Nov 30, 2012 at 1:32 PM, sumit srivastava < sumit.theinvinci...@gmail.com> wrote: > On 30 November 2012 10:55, Jim Ruther Nill wrote: > >> >> >> >> On Fri, Nov 30, 2012 at 1:16 PM, sumit srivastava < >> sumit.theinvinci...@gmail.com> wrote: >> >>> On 30 November 2012 10:41, Jim Ruther Nil

Re: [Rails] Issue with passing parameter to action using link_to

2012-11-29 Thread sumit srivastava
On 30 November 2012 10:55, Jim Ruther Nill wrote: > > > > On Fri, Nov 30, 2012 at 1:16 PM, sumit srivastava < > sumit.theinvinci...@gmail.com> wrote: > >> On 30 November 2012 10:41, Jim Ruther Nill wrote: >> >>> >>> >>> >>> On Fri, Nov 30, 2012 at 12:51 PM, Sumit Srivastava < >>> sumit.theinvinc

Re: [Rails] Issue with passing parameter to action using link_to

2012-11-29 Thread Jim Ruther Nill
On Fri, Nov 30, 2012 at 1:16 PM, sumit srivastava < sumit.theinvinci...@gmail.com> wrote: > On 30 November 2012 10:41, Jim Ruther Nill wrote: > >> >> >> >> On Fri, Nov 30, 2012 at 12:51 PM, Sumit Srivastava < >> sumit.theinvinci...@gmail.com> wrote: >> >>> Hi, >>> >>> I have a controller named Us

Re: [Rails] Issue with passing parameter to action using link_to

2012-11-29 Thread sumit srivastava
On 30 November 2012 10:41, Jim Ruther Nill wrote: > > > > On Fri, Nov 30, 2012 at 12:51 PM, Sumit Srivastava < > sumit.theinvinci...@gmail.com> wrote: > >> Hi, >> >> I have a controller named Users with index action. >> >> def index >> puts "* #{params[:city]}" >> ... >> .

Re: [Rails] Tokeninput incremental search not working

2012-11-29 Thread Jim Ruther Nill
On Fri, Nov 30, 2012 at 12:57 PM, Soichi Ishida wrote: > Rails 3.1.3 > > After watching > http://railscasts.com/episodes/258-token-fields?autoplay=true > I have installed the similar functionality to my app. > > However, > > def index > @cities = City.all > ... > > does in fac

Re: [Rails] Issue with passing parameter to action using link_to

2012-11-29 Thread Jim Ruther Nill
On Fri, Nov 30, 2012 at 12:51 PM, Sumit Srivastava < sumit.theinvinci...@gmail.com> wrote: > Hi, > > I have a controller named Users with index action. > > def index > puts "* #{params[:city]}" > ... > ... > end > > From the view, > link_to(:city, list_users_with_city_path(

[Rails] Tokeninput incremental search not working

2012-11-29 Thread Soichi Ishida
Rails 3.1.3 After watching http://railscasts.com/episodes/258-token-fields?autoplay=true I have installed the similar functionality to my app. However, def index @cities = City.all ... does in fact give the list of all cities in the text field, but def index @

[Rails] Issue with passing parameter to action using link_to

2012-11-29 Thread Sumit Srivastava
Hi, I have a controller named Users with index action. def index puts "* #{params[:city]}" ... ... end >From the view, link_to(:city, list_users_with_city_path(:city => city.name)) But when I click on this link, it doesn't prints out anything for the params. All the "*"

[Rails] Facebook omniauth nil object

2012-11-29 Thread Soichi Ishida
Rails 3.1.3 Gemfile gem 'authbuttons-rails' gem 'twitter' gem 'omniauth-twitter' gem 'omniauth-facebook' My app needs Facebook integration, and the similar method works for Twitter API. When it comes to Facebook, the create method in services_controller.rb raises an error You have a nil object

[Rails] bundle install fatal error

2012-11-29 Thread Adam A.
Greetings all, After being a c# programmer I wanted to get my feet wet in RoR. Good stuff. I'm running a cygwin (linux emmulator - sort of on Window 7). I have ruby installed: $ ruby -v ruby 1.9.3p327 (2012-11-10 revision 37606) [i386-cygwin] I have rails installed: $ rails -v Rails 3.2.9 I

[Rails] The last call for Fukuoka Ruby Competition! - Matz's videos are available!

2012-11-29 Thread Kazuhiro Koga
This is a reminder that Fukuoka Ruby award competition entry deadline is TODAY(11/29) at 12:00am!(11/30 5pm, Japan time). If you have developed Ruby programs within the past 12 months, please be encouraged to apply for this opportunity. Again, details are below... *2013 Fukuoka Ruby Award Compe

[Rails] Re: "rm public/index.html not recognized."

2012-11-29 Thread Jan V.
You need to "cd public" then "del index.html" windows always have problems with path :D -- 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@goo

[Rails] Guard-Compass fails to act on changes in Raisl 2.3.9

2012-11-29 Thread Matt Martini
Guard-Compass fails to act on changes in Raisl 2.3.9 (Ruby 1.9.3-p327) I have a Rails application that I'm upgrading from 3.1.1 to 3.2.9. Since I have a few applications to upgrade, I'm doing this one from scratch so that I can be sure as I add components that they work. Unfortunately, guard-comp

[Rails] Re: Are Rail's database tools really helpful?

2012-11-29 Thread KlausG
Hi, Am Mittwoch, 21. November 2012 11:56:58 UTC+1 schrieb Ruby-Forum.com User: > > > In a real world application, you don't just play with one table at a > time. You have to write long SQL requests, with several tables No in my application I am not working with tables at all, I am working with

Re: [Rails] [Rails 3.2] form_tag w :remote => true doesn't fire up the js format

2012-11-29 Thread Erwin
[SOLVED] Thanks Colin for pointing me to the log .. ( test.log.. as I am testing integration w Capybara + Selenium... => my eyes were looking at something else ..) I was looking the old way .. => a :format js ... parameter... in non obtrusive way , the log clearly state "Processing... as JS"

Re: [Rails] [Rails 3.2] form_tag w :remote => true doesn't fire up the js format

2012-11-29 Thread Colin Law
On 29 November 2012 14:27, Erwin wrote: > I have a form_tag written like this : > > = form_tag search_backoffice_places_path, {:remote =>"true", :id => > :searchplaceForm } do > .. input fields > = submit_tag t(:search) > > generated html is correct : > data-remote="true" id="searchplaceForm"

[Rails] [Rails 3.2] form_tag w :remote => true doesn't fire up the js format

2012-11-29 Thread Erwin
I have a form_tag written like this : = form_tag search_backoffice_places_path, {:remote =>"true", :id => :searchplaceForm } do .. input fields = submit_tag t(:search) generated html is correct : ... input fields upon submit, params received in backoffice/places_controller#search {"utf

Re: [Rails] Rspec post controller failure

2012-11-29 Thread Raul Sanchez
Done and green :) Thank you again 2012/11/29 Colin Law > On 29 November 2012 11:58, Raul Sanchez wrote: > > A :-) > > > > Thank you. > > > > Which will be the right way to do it? > > Just fetch it from the db again before tesating it > > Colin > > > > > El 29/11/2012 12:42, "Colin Law" e

Re: [Rails] Rspec post controller failure

2012-11-29 Thread Colin Law
On 29 November 2012 11:58, Raul Sanchez wrote: > A :-) > > Thank you. > > Which will be the right way to do it? Just fetch it from the db again before tesating it Colin > > El 29/11/2012 12:42, "Colin Law" escribió: >> >> On 29 November 2012 11:30, Raul Sanchez wrote: >> > Hello: >> > >>

Re: [Rails] Rspec post controller failure

2012-11-29 Thread Raul Sanchez
A :-) Thank you. Which will be the right way to do it? El 29/11/2012 12:42, "Colin Law" escribió: > On 29 November 2012 11:30, Raul Sanchez wrote: > > Hello: > > > > I'm going crazy with a test of a controller action. > > > > This is the test > > > > describe "POST changetipo" do > > i

Re: [Rails] Rspec post controller failure

2012-11-29 Thread Colin Law
On 29 November 2012 11:30, Raul Sanchez wrote: > Hello: > > I'm going crazy with a test of a controller action. > > This is the test > > describe "POST changetipo" do > it "toggle tipo of tije" do > tije = FactoryGirl.create(:tije) > puts "--- #{tije.inspect}---

Re: [Rails] Adding a input field (select box) to a cell in a table that is rendered from controller

2012-11-29 Thread Colin Law
On 29 November 2012 11:04, sumit srivastava wrote: > > On 29 November 2012 16:29, Colin Law wrote: >> >> On 29 November 2012 10:55, sumit srivastava >> wrote: >> > I need to add a functionality to a code someone else wrote. Just found >> > out >> > that, the dataTables jquery is just being used

[Rails] Rspec post controller failure

2012-11-29 Thread Raul Sanchez
Hello: I'm going crazy with a test of a controller action. This is the test describe "POST changetipo" do it "toggle tipo of tije" do tije = FactoryGirl.create(:tije) puts "--- #{tije.inspect}--" post :changetipo, :id => tije.id puts "+

Re: [Rails] Adding a input field (select box) to a cell in a table that is rendered from controller

2012-11-29 Thread Colin Law
On 29 November 2012 10:55, sumit srivastava wrote: > I need to add a functionality to a code someone else wrote. Just found out > that, the dataTables jquery is just being used to sort and paginate the > table. But the table is actually populated through controller. So what do you not know how to

Re: [Rails] Adding a input field (select box) to a cell in a table that is rendered from controller

2012-11-29 Thread sumit srivastava
I need to add a functionality to a code someone else wrote. Just found out that, the dataTables jquery is just being used to sort and paginate the table. But the table is actually populated through controller. Regards Sumit Srivastava The power of imagination makes us infinite... On 29 November

[Rails] Re: Is it ok to use struct as constants in initializer?

2012-11-29 Thread comopasta Gr
Jordon Bedwell wrote in post #1087053: > On Thu, Nov 29, 2012 at 3:47 AM, comopasta Gr > wrote: >> error_type = Struct.new(:code, :description) >> BAD_JSON = error_type.new("001" , "Problem parsing JSON") >> BAD_XML = error_type.new("002" , "Problem parsing XML") > > class MyClass > class APIPar

Re: [Rails] Adding a input field (select box) to a cell in a table that is rendered from controller

2012-11-29 Thread Colin Law
On 29 November 2012 10:25, sumit srivastava wrote: > Actually Jquery dataTables is being used to fetch the data and create the > table. So the question is nothing to do with Rails then? Colin > > Regards > Sumit Srivastava > > The power of imagination makes us infinite... > > > > On 29 November

Re: [Rails] Adding a input field (select box) to a cell in a table that is rendered from controller

2012-11-29 Thread Colin Law
On 29 November 2012 10:18, Jordon Bedwell wrote: > On Thu, Nov 29, 2012 at 4:15 AM, Colin Law wrote: >> The Rails Guide on Form Helpers shows you how to make select boxes. >> Remember that for valid html the entire table must lie within the >> form, or each cell must contain its own form. > > Are

Re: [Rails] Rails seo friendly urls

2012-11-29 Thread Jeffrey Jones
Jordan is saying that the above URL is just as SEO Friendly as the below URL. SEO Friendly != Looks nice to humans. This article has the gist of it: http://gabesumner.com/are-search-engine-friendly-urls-really-search-engine-friendly On 28/11/12 18:24, Jordon Bedwell wrote: On Wed, Nov 28,

Re: [Rails] Adding a input field (select box) to a cell in a table that is rendered from controller

2012-11-29 Thread sumit srivastava
Actually Jquery dataTables is being used to fetch the data and create the table. Regards Sumit Srivastava The power of imagination makes us infinite... On 29 November 2012 15:48, Jordon Bedwell wrote: > On Thu, Nov 29, 2012 at 4:15 AM, Colin Law wrote: > > The Rails Guide on Form Helpers sho

Re: [Rails] Adding a input field (select box) to a cell in a table that is rendered from controller

2012-11-29 Thread Jordon Bedwell
On Thu, Nov 29, 2012 at 4:15 AM, Colin Law wrote: > The Rails Guide on Form Helpers shows you how to make select boxes. > Remember that for valid html the entire table must lie within the > form, or each cell must contain its own form. Aren't tables are violation of the HTML spec anyways? I thoug

Re: [Rails] Adding a input field (select box) to a cell in a table that is rendered from controller

2012-11-29 Thread Colin Law
On 29 November 2012 08:47, Sumit Srivastava wrote: > Hi, > > I have a view in which a table is created with one head elements of the > table are defined like, > > %table.data-table{'data-searchable' => 'true'} > %thead > %tr > %th Email > %th.no-sort Name > %th Registered >

Re: [Rails] Is it ok to use struct as constants in initializer?

2012-11-29 Thread Jordon Bedwell
On Thu, Nov 29, 2012 at 4:11 AM, Jordon Bedwell wrote: > raise(MyClass::APIParseError.new("001", :XML)) > #=> MyClass::MyError: 001: Problem parsing XML This would actually display: "MyClass::APIParseError" I had a misspelling since I didn't run it through an REPL to get the output I just wrote i

Re: [Rails] Is it ok to use struct as constants in initializer?

2012-11-29 Thread Jordon Bedwell
On Thu, Nov 29, 2012 at 3:47 AM, comopasta Gr wrote: > error_type = Struct.new(:code, :description) > BAD_JSON = error_type.new("001" , "Problem parsing JSON") > BAD_XML = error_type.new("002" , "Problem parsing XML") class MyClass class APIParseError < StandardError def initialize(code, li

[Rails] Is it ok to use struct as constants in initializer?

2012-11-29 Thread comopasta Gr
I want to define simple global objects that contain a code and description for custom errors. Is it a bad idea to use structs in an initializer in the app? api_error_constants.rb in /config/initializers error_type = Struct.new(:code, :description) BAD_JSON = error_type.new("001" , "Problem parsin

[Rails] Re: Re: has_and_belongs_to_many for the same model

2012-11-29 Thread Soichi Ishida
>> >> in meeting.rb >> >> belongs_to :give_person, :class_name => "Person" >> belongs_to :take_person, :class_name => "Person" >> > > this means that the foreign key is set to give_person_id and > take_person_id > but in your person model, the foreign key is give_id and take_id > This was

[Rails] Re: has_and_belongs_to_many for the same model

2012-11-29 Thread Soichi Ishida
>i don't see any give_plan on your code. Sorry, I pasted a wrong portion of code error. it's > undefined method `give_person' for []:ActiveRecord::Relation > undefined method `give_person' for nil:NilClass -- Posted via http://www.ruby-forum.com/. -- You received this message because you are

[Rails] Adding a input field (select box) to a cell in a table that is rendered from controller

2012-11-29 Thread Sumit Srivastava
Hi, I have a view in which a table is created with one head elements of the table are defined like, %table.data-table{'data-searchable' => 'true'} %thead %tr %th Email %th.no-sort Name %th Registered %tbody The table is populated through controller. I need to add a se

Re: [Rails] Re: has_and_belongs_to_many for the same model

2012-11-29 Thread Jim Ruther Nill
On Thu, Nov 29, 2012 at 4:29 PM, Soichi Ishida wrote: > >https://www.google.com/search?q=rails+self+referential > > Thanks. This is what I wanted. > > But in my case, two model objects (in the RailsCasts, User) are equal. > So, I tried > > in person.rb > > has_many :give_meetinges, :class_nam

[Rails] Re: has_and_belongs_to_many for the same model

2012-11-29 Thread Soichi Ishida
>https://www.google.com/search?q=rails+self+referential Thanks. This is what I wanted. But in my case, two model objects (in the RailsCasts, User) are equal. So, I tried in person.rb has_many :give_meetinges, :class_name => "Meeting", :foreign_key => "give_id" has_many :gives, :class_na

Re: [Rails] has_and_belongs_to_many for the same model

2012-11-29 Thread Jordon Bedwell
On Wed, Nov 28, 2012 at 9:33 PM, Soichi Ishida wrote: > I am wondering if has_and_belongs_to_many association can be used for a > single model? Circular associations are possible, I do it all the time for comment systems. -- You received this message because you are subscribed to the Google Gro