[Rails] Re: Roll my own Role based permission or use CanCan Gem?

2012-01-14 Thread Don
Yes, CanCan is very "controller" centric. Sounds like the declarative_autorization gem allows one to follow the "skinny controllers, fat models" design mantra. I'll have to check it out. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.

Re: [Rails] Re: Roll my own Role based permission or use CanCan Gem?

2012-01-14 Thread Don
CanCan is Rails specific - the docs on GitHub clearly state it is for Ruby on Rails. From my limited experience, CanCan requires Gems that are Rails specific and relies on many aspects of Rail's MVC structure. I estimate it would be a big job to rework CanCan to be not dependent on Rails plug-

[Rails] Re: has_many :through => has_many

2012-01-14 Thread Fritz Rodriguez
Thanks for your help Colin, resolved the issued by changing my model associations class NameAlias < ActiveRecord::Base has_many :sub_tasks has_many :work_orders, :through => :sub_tasks class SubTask < ActiveRecord::Base belongs_to :name_alias belongs_to :work_order class WorkOrder <

[Rails] Re: Team viewer for install

2012-01-14 Thread Mathew S.
On 14 January 2012 17:22, Mathew S. wrote: > Should I be using a different program and just delete Aptana? You don't need an ide for RoR. Just use a good editor that understands ruby syntax and run commands in the terminal window. Colin > Could you explain a little more? Is there any video o

[Rails] Re: Team viewer for install

2012-01-14 Thread Mathew S.
Could you explain a little more? Is there any video out there? -- 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@googlegroups.com. To unsubscr

Re: [Rails] posts re consulting/help with projects

2012-01-14 Thread Bill Walton
Hi Dave, On Sat, Jan 14, 2012 at 4:13 PM, Dave Aronson wrote: > > What's the feeling here on announcing work, or availability for work? > The Google Group's page doesn't say anything about it, nor does the > forum (at least without registering), but I haven't seen many such > posts, which I think

[Rails] Re: has_many :through => has_many

2012-01-14 Thread Fritz Rodriguez
Okay, thanks! Here is the full trace with code section, appreciate any insight! Attachments: http://www.ruby-forum.com/attachment/6913/full_trace.txt -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"

[Rails] posts re consulting/help with projects

2012-01-14 Thread Dave Aronson
On Sat, Jan 14, 2012 at 16:41, Colin Law wrote: > On 14 January 2012 17:51, Fritz Rodriguez wrote: ... >> Do you/available for consulting/help with a projects? if so, how does it >> work? per hour, etc.. > > No, I just try to help out in my spare time. That said, though, if someone needs help an

Re: [Rails] Error in Creating a rubyonrails application

2012-01-14 Thread Colin Law
On 14 January 2012 14:17, KUMUDINI PAWAR wrote: > when i try to run the rails server after successfully creating a rails > application i get following error... > can you please suggest some solutions to fix this. > > > sward@master:~/work/myapp$ rails server > /usr/lib/ruby/gems/1.8/gems/execjs-1.

Re: [Rails] Re: Re: Re: has_many :through => has_many

2012-01-14 Thread Colin Law
On 14 January 2012 21:41, Colin Law wrote: > On 14 January 2012 17:51, Fritz Rodriguez wrote: >> Colin Law wrote in post #1040893: >>> On 14 January 2012 16:59, Fritz Rodriguez wrote: >> belongs_to :work_order of the is post. accepts_nested_attributes_for :name_alias accepts_n

[Rails] Error in Creating a rubyonrails application

2012-01-14 Thread KUMUDINI PAWAR
when i try to run the rails server after successfully creating a rails application i get following error... can you please suggest some solutions to fix this. sward@master:~/work/myapp$ rails server /usr/lib/ruby/gems/1.8/gems/execjs-1.2.13/lib/execjs/runtimes.rb:47:in `autodetect': Could not fin

[Rails] Looking For Ruby programming language developers, team lead and project manager - Atlanta

2012-01-14 Thread Mahesh Misar
Hi, Kindly forward your updated resume on mah...@bravensinc.com with your expected rates/hr for position with your current working number, location and availability and please fill up the skill matrix below is the job description. 2 Project Managers – Ruby project experience 10 Developers, Sen

[Rails] 14 Contract consultant needed - Ruby programming language developers, team lead and project manager - Atlanta

2012-01-14 Thread Mahesh Misar
Kindly forward your updated resume on mah...@bravensinc.com with your expected rates/hr for position with your current working number, location and availability and please fill up the skill matrix below is the job description. 2 Project Managers – Ruby project experience 10 Developers, Senior De

Re: [Rails] Re: Re: Re: has_many :through => has_many

2012-01-14 Thread Colin Law
On 14 January 2012 17:51, Fritz Rodriguez wrote: > Colin Law wrote in post #1040893: >> On 14 January 2012 16:59, Fritz Rodriguez wrote: > belongs_to :work_order >>> of the is post. >>> accepts_nested_attributes_for :name_alias >>> accepts_nested_attributes_for :work_order >>> >>> This produc

Re: [Rails] Re: Team viewer for install

2012-01-14 Thread Colin Law
On 14 January 2012 17:22, Mathew S. wrote: > Should I be using a different program and just delete Aptana? You don't need an ide for RoR. Just use a good editor that understands ruby syntax and run commands in the terminal window. Colin -- You received this message because you are subscribed

[Rails] Re: mysql2 error in production

2012-01-14 Thread Alex Mercer
Add to your Gemfile: gem 'mysql' then run `bundle`. On 14 янв, 17:25, Erwin wrote: > As I need to upgrade a Rails app to 3.1 , I am trying to deploy it on > a remote production server ( Linux Debian, after installing Rails > 3.0.9  under rvm  with all needed gems including mysql2 version 0.2.18 >

Re: [Rails] Re: Roll my own Role based permission or use CanCan Gem?

2012-01-14 Thread Santosh c
Hi, my app is ruby based but I am not using rails. Can I still use CanCan? -- 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@googlegroups.com. To unsubscribe from this group, send email

Re: [Rails] Re: Re: listmania - anaylsing multiple lists in a method

2012-01-14 Thread Dave Aronson
On Sat, Jan 14, 2012 at 14:20, bingo bob wrote: > I'm doing it wrong aren't I ! ? Not necessarily. If it's OK for your purposes, that two people named Harry have their names being two different objects, your model (as I understand it, which may be incorrectly) is perfectly fine. > I need to do

[Rails] Re: listmania - anaylsing multiple lists in a method

2012-01-14 Thread bingo bob
How do I setup the habtm relationships I need an additional table right? -- 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@googlegroups.com. T

[Rails] Re: Re: listmania - anaylsing multiple lists in a method

2012-01-14 Thread bingo bob
Dave Aronson wrote in post #1040718: > On Fri, Jan 13, 2012 at 07:21, bingo bob wrote: > >> User has_many names >> Name belongs_to User > > So the two 'harry's in your list are two different objects? Is that a > necessary part of your model? > > -Dave I'm doing it wrong aren't I ! ? I need to do

[Rails] Re: has many relation - destroy troubles RESOLVED

2012-01-14 Thread Douglas Birch
Uh ... ended up changing things to use the Has Many Through association ... now it all works and looks like this: #Created a parties table class CreateParties < ActiveRecord::Migration def change create_table :parties do |t| t.string :type t.timestamps end end end #crea

Re: [Rails] Re: keep-alive no working on dynamic content.

2012-01-14 Thread Hassan Schroeder
On Sat, Jan 14, 2012 at 9:30 AM, Philip T. wrote: > I've not tried others, and there may be push back if I suggest this as a > solution, for various reasons. I didn't suggest it as a solution; it's part of problem isolation. And don't you have a development/test/staging environment which replica

[Rails] Re: Re: Re: has_many :through => has_many

2012-01-14 Thread Fritz Rodriguez
Colin Law wrote in post #1040893: > On 14 January 2012 16:59, Fritz Rodriguez wrote: belongs_to :work_order >> of the is post. >> accepts_nested_attributes_for :name_alias >> accepts_nested_attributes_for :work_order >> >> This produced a "Unknown key: through" error? Not sure I place the >>

[Rails] Re: keep-alive no working on dynamic content.

2012-01-14 Thread Philip T.
I've not tried others, and there may be push back if I suggest this as a solution, for various reasons. So solving with apache is my current goal. It may also be worth noting that it's https in production, and it seems to keep connections alive for some clients but not others for http, but clos

[Rails] Re: Team viewer for install

2012-01-14 Thread Mathew S.
Should I be using a different program and just delete Aptana? -- 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@googlegroups.com. To unsubscri

Re: [Rails] Re: Re: has_many :through => has_many

2012-01-14 Thread Colin Law
On 14 January 2012 16:59, Fritz Rodriguez wrote: > Colin Law wrote in post #1040834: >> On 14 January 2012 04:12, Fritz Rodriguez wrote: >>> >>> class NameAlias < ActiveRecord::Base >>> belongs_to :work_order >>> has_many :sub_tasks >>> end >>> >>> class SubTask < ActiveRecord::Base >>> belongs_t

Re: [Rails] Re: Re: has_many :through => has_many

2012-01-14 Thread Colin Law
On 14 January 2012 16:59, Fritz Rodriguez wrote: > Colin Law wrote in post #1040834: >> On 14 January 2012 04:12, Fritz Rodriguez wrote: >>> >>> class NameAlias < ActiveRecord::Base >>> belongs_to :work_order >>> has_many :sub_tasks >>> end >>> >>> class SubTask < ActiveRecord::Base >>> belongs_t

[Rails] Re: passenger does not see gems in vendor/cache

2012-01-14 Thread Steven F.
Well, this makes little sense to me, but it is a work-around for this problem. Add the following line to your deploy.rb file: before "deploy:assets:precompile", :bundle_install I've also run (on the server) "bundle config path vendor/cache" and placed "export BUNDLE_PATH=vendor/cache" in the

[Rails] Re: Re: has_many :through => has_many

2012-01-14 Thread Fritz Rodriguez
Colin Law wrote in post #1040834: > On 14 January 2012 04:12, Fritz Rodriguez wrote: >> >> class NameAlias < ActiveRecord::Base >> belongs_to :work_order >> has_many :sub_tasks >> end >> >> class SubTask < ActiveRecord::Base >> belongs_to :name_alias >> belongs_to :work_order > > This should be be

Re: [Rails] Devise Authentication

2012-01-14 Thread Joao Souza
Ok, but it appear to be incomplete.. I need know how to delete all files used by restful. After follow the tutorial bellow, my app don't run. It appear that there is some conflict with session. I appreciate if someone can send the step-by-step to complete remove Restful, then I will try to install

Re: [Rails] Re: Re: keep-alive no working on dynamic content.

2012-01-14 Thread Hassan Schroeder
On Sat, Jan 14, 2012 at 7:31 AM, Philip T. wrote: > Googleing suggests that the keepAlive setting in Apache is all I need to > change. Having change the httpd.conf I can see the changes (examinin the > response headers) in the static content, but not the ruby stuff. Do you see the same behavior

Re: [Rails] Devise Authentication

2012-01-14 Thread Colin Law
On 14 January 2012 16:11, joao souza wrote: > Hi everyone > > Is there any way to smoothly transition from Restful Authentication to > Devise? Google found this for me https://github.com/plataformatec/devise/wiki/How-To:-Migrate-from-restful_authentication-to-Devise Colin -- You received this

Re: [Rails] Devise Authentication

2012-01-14 Thread Peter De Berdt
On 14 Jan 2012, at 17:11, joao souza wrote: Is there any way to smoothly transition from Restful Authentication to Devise? https://github.com/plataformatec/devise/wiki/How-To:-Migrate-from-restful_authentication-to-Devise Best regards Peter De Berdt -- You received this message because y

[Rails] Devise Authentication

2012-01-14 Thread joao souza
Hi everyone, Is there any way to smoothly transition from Restful Authentication to Devise? -- 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@googlegroups.com. To unsubscribe from this

[Rails] Devise Authentication

2012-01-14 Thread joao souza
Hi everyone Is there any way to smoothly transition from Restful Authentication to Devise? -- 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@googlegroups.com. To unsubscribe from this g

[Rails] Re: Re: keep-alive no working on dynamic content.

2012-01-14 Thread Philip T.
I can't give out the link in question. Sorry. However I can explain what is happening. The connection is being closed on dynamic pages. Refreshing the same page results in a full https handshake (2 full round trips). Also the response headers show connection: close. But only for dynamic content

[Rails] Bot-Away v2.0 Released

2012-01-14 Thread Colin Mackenzie iv
Version 2.0 of Bot-Away has been released. Once added to a project, Bot-Away silently, unobtrusively works to prevent submissions by spambots on your Rails application. It employs a variety of techniques to bewilder automated spam bots, and hooks into the ActionDispatch middleware to validate the

[Rails] mysql2 error in production

2012-01-14 Thread Erwin
As I need to upgrade a Rails app to 3.1 , I am trying to deploy it on a remote production server ( Linux Debian, after installing Rails 3.0.9 under rvm with all needed gems including mysql2 version 0.2.18 used by the app) after deployment, starting the app, I get a Load error w mysql2... ** [o

[Rails] Re: weird error w Haml - Rails 3.1

2012-01-14 Thread Erwin
thanks , .. I realize that by duplicating another similar line ( copy/ paste) and changing the image url ... looking so hard to the second part of the line I forgot the beginning .. On Jan 14, 12:24 pm, Colin Law wrote: > On 14 January 2012 10:47, Erwin wrote: > > > > > > > > > > > I am trying

[Rails] Re: Ruby installation error

2012-01-14 Thread Alex Mercer
Kamal, this might be helpful: $ rvm get head $ rvm remove 1.9.2 $ rvm reload $ rvm pkg install readline $ rvm install 1.9.2 On Jan 14, 11:12 am, Colin Law wrote: > On 13 January 2012 18:02, Kamal wrote: > > > Hi, I am a newbie to Ruby and I have been installing ruby 1.9.2 > > following

Re: [Rails] Re: alert with 3 button

2012-01-14 Thread Javier Quarite
On Sat, Jan 14, 2012 at 4:11 AM, Joachim Cheng wrote: > Yeah, I can do it. > > <%= link_to "save", "#", :remote=>true, :onclick=>"save_with_click"%> > function save_with_click(){ > $("#form_id").submit(); > } > > change to: > > <%= form_tag save_file_path, :id => 'mysubmitform' do %> > ... > > s

Re: [Rails] weird error w Haml - Rails 3.1

2012-01-14 Thread Colin Law
On 14 January 2012 10:47, Erwin wrote: > I am trying display an image with the standard image_tag helper, using > options ... > > = image_tag ("errors/not_found_medium.jpg", :size => "300x300", :alt > => "error") > > and I am getting a 550 error ..  during haml compiling ,  seems not > accepting a

[Rails] weird error w Haml - Rails 3.1

2012-01-14 Thread Erwin
I am trying display an image with the standard image_tag helper, using options ... = image_tag ("errors/not_found_medium.jpg", :size => "300x300", :alt => "error") and I am getting a 550 error .. during haml compiling , seems not accepting any option ( :size .. :alt .. height ) ERROR: comp

Re: [Rails] Re: has_many :through => has_many

2012-01-14 Thread Colin Law
On 14 January 2012 04:12, Fritz Rodriguez wrote: > Hello All > > This is my first time on ruby-forum so pardon if this is not posted > correctly. > > I am having a very similar issue regarding has_many through has_many.  A > logged user can create a work order and associated fields in models name

Re: [Rails] has many relation - destroy troubles

2012-01-14 Thread Colin Law
On 14 January 2012 01:43, Douglas B. wrote: > Hello, Rookie here ... learning rails and enjoying it ... having a > bit-o-trouble with has many in the following scenario: > > class Party < ActiveRecord::Base >  has_many :target_associations, :foreign_key => 'source_party_id', >                    

Re: [Rails] Ruby installation error

2012-01-14 Thread Colin Law
On 13 January 2012 18:02, Kamal wrote: > Hi, I am a newbie to Ruby and I have been installing ruby 1.9.2 > following this link. > http://toranbillups.com/blog/archive/2010/09/01/How-to-install-Rails-3.0-and-Ruby-1.9.2-on-Ubuntu > I am stuck at 'rvm install ruby-1.9.2' > > I get this error: > error

[Rails] Re: alert with 3 button

2012-01-14 Thread Joachim Cheng
Yeah, I can do it. <%= link_to "save", "#", :remote=>true, :onclick=>"save_with_click"%> function save_with_click(){ $("#form_id").submit(); } change to: <%= form_tag save_file_path, :id => 'mysubmitform' do %> ... save function save(){ $('#mysubmitform').submit(); return false;