[Rails] Re: Unable to delete post in sample blog application

2014-04-02 Thread Wei Xia
link_to 'Destroy', post_path(post), bla bla bla Gel de sílice de tipo B /A/C http://es.silicon-gel-china.com -- 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 st

Re: [Rails] Retweet Function

2014-04-02 Thread Marcos Korody
Hello Tariq, and whoever it may concern. I've implemented this using a join model, which we can call Reposts, that has its id, an author_id and a post_id. In my app: - Author has many Posts. - Post belongs to Author and has many Reposts. - Repost belongs to Post and belongs to Author Then, w

[Rails] Trying to understand eager loading and accessing collections from within instance methods

2014-04-02 Thread Tyler Benziger
I'm trying to optimize some of my queries by taking advantage of eager loading. I've created a gist with the specific problem I'm seeing here: https://gist.github.com/tybenz/9944205 Any ideas why the eager loading works for grabbing the collection from the rails console but a SQL query is requ

[Rails] Re: Default value for country_select

2014-04-02 Thread Anu Sebastian
tamouse m. wrote in post #1139937: > On Thu, Mar 13, 2014 at 1:26 AM, Anu Sebastian > wrote: >> how to add defult value to the country_select gem.. pls help me >> > > I don't know for sure, but I think you can pass in an option: > `:selected => code` where code is the country code. not working...

[Rails] Best way to implement User model with Interests?

2014-04-02 Thread Cameron Craig
I have a model with a belongs_to relationship to my Category model. I now need to implement a User model where a user can select each category they are interested in out of all categories available in the database. Since Category shares a relation with the another object I don't know if a HABTM

Re: [Rails] Has Rails 4.0.4 really been released

2014-04-02 Thread Hassan Schroeder
On Wed, Apr 2, 2014 at 7:27 PM, Karthikeyan A K <77mi...@gmail.com> wrote: > I am confused between this blog > http://weblog.rubyonrails.org/2014/3/14/Rails-4-0-4-has-been-released/ and > http://runbyonrails.org which still shows 4.0.3 which was released on Feb > 18. > > Which one should I believe

[Rails] Has Rails 4.0.4 really been released

2014-04-02 Thread Karthikeyan A K
Hello People, I am confused between this blog http://weblog.rubyonrails.org/2014/3/14/Rails-4-0-4-has-been-released/ and http://runbyonrails.org which still shows 4.0.3 which was released on Feb 18. Which one should I believe / use? -- Regards Karthikeyan A K -- You received this message

[Rails] User.init method inside User.rb. Is this good practice?

2014-04-02 Thread Brandon
I'm sort of conflicted here. I'm using CanCan and it automatically load and authorize User/Create. My Facebook/Init is as follows. I'm tempted to do something similar and call User/Init from User/Create method. This way I hide the implementation in the UserController so User/Create and User/Upd

[Rails] Re: ActionController::Live in development without "config.cache_classes = true"?

2014-04-02 Thread Maximilian Busch
Thanks for heading back here, Kristijan - I'll go with that setting once I've some resources available to test this. Am Mittwoch, 2. April 2014 00:57:09 UTC+2 schrieb Kristijan Sedlak: > > Just add config.allow_concurrency = true to your development.rb. > > > On Thursday, August 15, 2013 5:05:06

[Rails] Re: cucumber tests failing - No route matches [GET] "/stylesheets

2014-04-02 Thread jsnark
Both problems solved. To solve the first problem, I trashed what I had done and started over. I do not know what went wrong the first time. The second problem was caused by pilot error. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.

[Rails] Re: Cannot execute stored procedure in Rails 3 and mysql2 gem

2014-04-02 Thread Nirmalya Ghosh
Thanks Zinia for the reply and I think I got the answer. Thanks Again. Best Regards, Nirmalya Ghosh Zinia Dutta Gupta wrote in post #1141735: > Hello Nirmalya, > > Solution : > When MySQL runs stored procedure it has to know that client can handle > multiple result sets. > > We will cr

[Rails] Re: Cannot execute stored procedure in Rails 3 and mysql2 gem

2014-04-02 Thread Zinia Dutta Gupta
Hello Nirmalya, It's a very important question which you have right now, fortunately I think I know the answer, here I am giving you the solution --- Solution : When MySQL runs stored procedure it has to know that client can handle multiple result sets. We will create patch file for that in our