Re: [Rails] How do I run an action on a dedicated thread?

2019-08-08 Thread Eric Jesse Knutsen
San, I hope you know I meant no offense. This is a strange issue to have and is normally indicative of an architectural design flaw and without having more details that might violate your nda, we can only go based on facts entered into evidence, to borrow a phase from legal. An application can be

Re: [Rails] How do I run an action on a dedicated thread?

2019-08-08 Thread Eric Jesse Knutsen
hmm... It sounds like you might want to isolate this into a micro-service then. Honestly, and architecturally, it sounds like this process flow might need a redesign, especially as it relies on a resource external to the main application. I am guessing that this is legacy? Is this application

Re: [Rails] How do I run an action on a dedicated thread?

2019-08-08 Thread Eric Jesse Knutsen
It sounds like this might be best served by encapsulating the caller in a job and then setting up a dedicated queue for that job in your background processes, if I am understanding correctly what this is. If you need to have the results display when complete then you could set up a poller or a

[Rails] Re: Rails 5.2 Custom Credentials — generally accepted way to segregate environments?

2019-06-10 Thread Eric Anderson
I've found the rails-env-credentials <https://github.com/sinsoku/rails-env-credentials> gem useful for this. Not sure how compatible it will be with the upcoming Rails 6 support but its been working great for my app. Eric On Sunday, June 9, 2019 at 9:40:05 PM UTC-4, Jason Fleetwood

[Rails] Re: How do you generically call a scope on a model?

2019-03-18 Thread Eric Anderson
would want to whitelist against the scopes you have defined. Also remember scopes are just a class method that returns an ActiveRecord::Relation. I.E. you may have a "scope" that wouldn't be on any Rails internal data structure if the `scope` method was not used to define it. Eric

[Rails] Re: PostgreSQL Array column + has_many association

2019-02-04 Thread Eric Anderson
I don't think this is supported out-of-the-box in Rails but I did see this extension a while back that appears to add what you are looking for: https://github.com/marshall-lee/has_array_of Haven't personally used it but looks promising. Eric On Wednesday, April 11, 2018 at 7:51:00 AM UTC-4

[Rails] Why are has_one through has_one relationships not constructible in the same way that has_many throug

2018-11-10 Thread eric
Per my question on StackOverflow: https://stackoverflow.com/questions/53243674/build-methods-for-has-one-though-has-one And the subsequent answer there, I'm wondering why has_one relationships don't behave the same way as has_many relationships in terms of building nested associations. I

[Rails] Re: Proper Coding Question

2018-10-04 Thread Eric Anderson
pp and I saw that the policy_scope was called in the controller and the result was passed to the view I wouldn't think bad of it. Eric On Thursday, October 4, 2018 at 4:19:47 AM UTC-4, Rob Jonson wrote: > > Hi John, > > firstly - I don't know pundit, so this is only general advic

[Rails] Re: Proper Coding Question

2018-10-03 Thread Eric Anderson
There is an `collection_select` form builder that will do the `collect` for you. So: <%= f.collection_select :user, policy_scope(User), :id, :name %> If you are not using a form builder then `options_from_collection_for_select` is useful for the same purpose. If those helpers cannot be

RE: [Rails] Heroku and Javascript

2018-07-25 Thread Eric Jesse Knutsen
Anything in browser javascript console? Is anything not being served properly? And, dumb question time but we all have these kind of moments, did you remember to precompile, and are all your JS libraries set to have pointers to the compiled locations of assets? Cheers, Jess From: David

[Rails] Re: Why doesn't collection=objects on has_many :through trigger destroy callbacks on the join model?

2015-12-17 Thread Eric Krause
the records from partnerships without callbacks. The dependent: :destroy on the partners relationship fixed that. Callbacks are now being run and things are good again. Eric On Monday, December 14, 2015 at 5:43:57 PM UTC-7, spike22 wrote: > > I've asked this on on Stack Overflow but didn't r

Re: [Rails] Re: Why doesn't collection=objects on has_many :through trigger destroy callbacks on the join model?

2015-12-17 Thread Eric Krause
I just did that this morning. On Thursday, December 17, 2015, spike22 <bren...@spikeinsights.co.nz> wrote: > Hi Eric, that's really interesting! I'll give it a whirl and report back > :) I might do a documentation pull request to clarify this too. > > Have a great day! > &g

Re: [Rails] one liner with rescue is good style ?

2015-11-05 Thread Eric Lavigne
byonrails-talk@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/d9c52162-6942-4f29-a2f1-2287af28ae8b%40googlegroups.com > <https://groups.google.com/d/msgid/rubyonrails-talk/d9c52162-6942-4f29-a2f1-2287af28ae8b%40googlegroups.

[Rails] LOOP ARRAY OF HASHES

2015-06-16 Thread Simon Eric
Please how can i loop this to have all values of _id, contact, sent, answer, repondant? { result : [ { _id : null, contact : 45684, sent : 0, answer : 0, repondant : 0 }, { _id : vms,

[Rails] NET/HTTP GET VALUE

2015-03-07 Thread Simon Eric
I have two app in rails that communicate between net/http: In the first app controller is something like so: class WebservicesController ApplicationController require 'net/http' require uri layout 'admin' def ws uri = URI(http://localhost:3001/api/ws;)

[Rails] Keep data on the field after submit a form with error

2015-02-07 Thread Simon Eric
After validation, I got error and return back to :action = :new. Some field on form already filled, so I want to keep them filled after error message too. How it can be done in rubyonrails4? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to

[Rails] Re: Couldn't find 'migration' generator

2014-09-26 Thread eric felleiter
Isn't it just script/generate migration On Thursday, September 25, 2014 3:13:12 AM UTC-4, M,Gopi M.gopinath wrote: Hi, I am trying to add a field in a existing table (database) in Rails 2.3.5 and ruby 1.8.6. I gave a command to generate a migration, Here as follows, ruby

[Rails] Re: openstreetmap as link

2014-08-15 Thread Eric Saupe
%= link_to('my_link') do % divOPEN STREETMAP CONTENT/div% end % You can put a div inside of the a generated by link_to and this will work for you but putting block elements inside of a is not really good practice. Instead you could try span instead of div On Friday, August 15, 2014

[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

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

2014-08-13 Thread Eric Saupe
No, the render command goes in your layout in this case since it is something that a lot of your views are using. %= render “sidebar” unless current_page?(login_path) % On Wednesday, August 13, 2014 12:32:48 AM UTC-6, Roelof Wobben wrote: oke , and put this in the controller ?? Roelof

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

2014-08-13 Thread Eric Saupe
. I see a message that login_path is not known. I think that devise is messing things up. Roelof Op woensdag 13 augustus 2014 17:56:23 UTC+2 schreef Eric Saupe: No, the render command goes in your layout in this case since it is something that a lot of your views are using. %= render

Re: [Rails] Error after calling bundle install (Ruby on Rails installation) (Mac OS X)

2014-08-06 Thread Eric Saupe
OSX doesn't have apt-get. You should use brew instead,http://stackoverflow.com/questions/19688424/why-is-apt-get-function-not-working-in-terminal-on-mac-osx-10-9, but this can occasionally have different installation instructions. Make sure you are installing MySQL correctly for Mac. On

[Rails] Re: General Information About RoR

2014-08-04 Thread Eric Saupe
Hey Diego, First, there is nothing wrong with running a local web server and just having your browsers access it. Since the only users of your application are going to be those on the same network it really doesn't matter if it is hosted externally or internally and since the Internet going

Re: [Rails] Re: General Information About RoR

2014-08-04 Thread Eric Saupe
: A quick update: it seems that the printer manufacturer provides a integration tool built in a dll file. If that is of any help towards the solution. 2014-08-04 14:22 GMT-03:00 Diego Dillenburg Bueno diegodi...@gmail.com javascript:: Hey Eric, thanks for the attention, really helped me

[Rails] Re: password validation triggered even I update non-password attribute

2014-08-01 Thread Eric Saupe
I had this same problem a while ago. The issue comes in the update_attributes since it wants to update all of the attributes that are being passed to it, which is including an empty password. To fix it you'll need to do two things. First change the validates to only validate if a password is

Re: [Rails] Variable + string to specify variable

2014-07-31 Thread Eric Saupe
I knew there would be a nice simpler Ruby way. I love the second solution, Rob. Below is the updated example. id = 100 arrays = [Array.new, Array.new, Array.new] arrays.sample.push(id) On Thursday, July 31, 2014 8:45:33 AM UTC-6, Rob Biedenharn wrote: On 2014-Jul-30, at 10:59 , Eric Saupe

Re: [Rails] Variable + string to specify variable

2014-07-30 Thread Eric Saupe
To expand on what Scott is saying here is some code that gives an example of what he is referring to. id = 100 x = rand(1..3) arrays = [Array.new, Array.new, Array.new] selected_array = arrays[x] selected_array.push(id) On Tuesday, July 29, 2014 8:05:16 PM UTC-6, Scott Ribe wrote: On Jul

[Rails] Re: Customise message for validates_uniqueness_of

2014-07-28 Thread Eric Saupe
This is along the lines of what Matt is referring to. class DayValidator ActiveRecord::Validator def validate() if YOUR_TEST_FOR_INVALIDITY(record.day) date = Date::DAYNAMES[record.day] record.errors[:day] already has a target #{date} end end end class YourClass

Re: [Rails] undefined method `authenticate' for nil:NilClass

2014-07-21 Thread Eric Saupe
@Ian, He is not using Devise if he is going through the Hartl tutorial. Scott's suggestion is the one that should be followed. On Monday, July 21, 2014 10:36:01 AM UTC-6, Ian_Rgz wrote: It seems that you need to create the Devise mapping(If you're using devise), to fix this you can: - Set

Re: [Rails] Re: Upload UTF-8 encoded textfile

2014-07-17 Thread Eric Saupe
Colin, That shows how to create a Tempfile with a given encoding but the question is when a user uploads a file through a form and Rails creates a Tempfile is there a way to indicate that it should always create those Tempfiles with a default encoding such as UTF-8? On Thursday, July 17, 2014

Re: [Rails] Re: Upload UTF-8 encoded textfile

2014-07-17 Thread Eric Saupe
wrote: On 17 July 2014 15:42, Eric Saupe eric...@gmail.com javascript: wrote: Colin, That shows how to create a Tempfile with a given encoding but the question is when a user uploads a file through a form and Rails creates a Tempfile is there a way to indicate that it should

[Rails] Re: Re: Upload UTF-8 encoded textfile

2014-07-17 Thread Eric Saupe
UTC-6, Ruby-Forum.com User wrote: Colin Law wrote in post #1152686: On 17 July 2014 15:42, Eric Saupe eric...@gmail.com javascript: wrote: That shows how to create a Tempfile with a given encoding but the question is when a user uploads a file through a form and Rails creates

[Rails] Re: Upload UTF-8 encoded textfile

2014-07-16 Thread Eric Saupe
Does setting config.encoding = utf-8 in your config/application.rb help? You'd also need to add # encoding: UTF-8 to the top of your file. I was reading this http://craiccomputing.blogspot.com/2011/02/rails-utf-8-and-heroku.html which seems to discuss this problem. On Wednesday, July 16,

[Rails] Re: SQL OR in RoR

2014-07-16 Thread Eric Saupe
@games = Game.sorted.where(home_team = :id OR away_team = :id, id: params [:id]) That should do the trick for you. You can have a string inside of your where statement that equates to SQL. You can then have named parameters that are used throughout the query as I have done above. In this case

[Rails] Re: Upload UTF-8 encoded textfile

2014-07-15 Thread Eric Saupe
Gotcha. Is the file actually opened when the controller is entered? (That's an honest question I'm interested in how that works coming as an upload from a form) The way you've described, that I failed to understand the first time, to me seems like the best way but I'd be interested to see what

Re: [Rails] Re: cannot connect to local host

2014-07-14 Thread Eric Saupe
Hassan is right. I doubt the problem is with your Gemfile.lock so I suggest starting elsewhere and leaving it alone. The best thing would be to stash your changes using git and going back to a working version of the application. Go back to the last version that worked and see what's different.

[Rails] Re: Upload UTF-8 encoded textfile

2014-07-14 Thread Eric Saupe
Maybe try this? http://stackoverflow.com/questions/5163339/write-and-read-a-file-with-utf-8-encoding Does it matter if every file is considered UTF-8 even if it never contains a UTF-8 character? On Monday, July 14, 2014 5:01:11 AM UTC-6, Ruby-Forum.com User wrote: My Rails application (Rails

[Rails] Re: layout rendering problem

2014-07-14 Thread Eric Saupe
Because you have /layouts inside of /welcome it would need to be %= render 'welcome/layouts/login' % and I think you'll also need an underscore before login.html.haml to make it _login.html.haml because it's a partial. On Sunday, July 13, 2014 5:45:39 AM UTC-6, Roelof Wobben wrote: Hello,

[Rails] Re: how to make this form

2014-07-14 Thread Eric Saupe
%= form_for @user do |f| % div class=field %= f.label :login_naam %: %= f.text_field :login_naam, class: login, placeholder: login naam %br / /div %= f.submit % % end % You'll want to let Rails take care of the id's so they can match up the label with the field automatically as

[Rails] STI where inheritance column values are not the same as the name of the class

2014-07-10 Thread Eric Roberts
I recently tried to retrofit STI on a database table that had already existed for a while. Here's a basic outline of the scenario. 1. I had a class 'Code' and a database table 'codes'. 2. 'Code' had an attribute 'units', which could be either '$' or '%' 3. I wanted the STI classes to

[Rails] Re: SPECIALS RELATIONSHIP!?

2014-05-30 Thread Simon Eric
I resolved that problem. I done somethig like so to update each column: def update_multiple @postis = Posti.find(params[:posti_ids]) @postis.each do |posti| posti.update_column(:stato, params[:posti]) end redirect_to prenotazione_path(params[:spectacle_id]) end %=

[Rails] SPECIALS RELATIONSHIP!?

2014-05-28 Thread Simon Eric
i want to associate one model with 4 models. For example i call a first model Spectacle and call others Hall1, Hall2, Hall3 and Hall4. All of Halls have the same attributes: id and seat. Each Hall have 10 seats. I want to create an spectacle on the database and associate it with any Hall.

[Rails] Re: SPECIALS RELATIONSHIP!?

2014-05-28 Thread Simon Eric
Thank you very much Jesse! -- 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 from it, send an email to

[Rails] Re: SPECIALS RELATIONSHIP!?

2014-05-28 Thread Simon Eric
Thank you very much Colin. I will try that :) -- 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 from it, send an email to

[Rails] Re: SPECIALS RELATIONSHIP!?

2014-05-28 Thread Simon Eric
Colin i try what you tell me. It work find. Thank very much. The next step is that: if an user choice the seat on the hall, it must not be appear againt on the view. I have some view like this: %= form_tag( riepilogo_path, method: post, id: sel) do % %= hidden_field_tag sala, params[:sala]

[Rails] Re: Re: SPECIALS RELATIONSHIP!?

2014-05-28 Thread Simon Eric
Please i try this: @postis.update_column(stato: checked) but i have error like so: undefined method `update_column' for #Array:0xb7a50e8 -- 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

[Rails] Re: Re: Re: SPECIALS RELATIONSHIP!?

2014-05-28 Thread Simon Eric
@postis is an string. Now i see where i the problem. I fix them like so: def posti_multiple @postis = Posti.find(params[:posti_ids]) a=Posti.find_by(numero: params[:posti_ids]) a.update_column(:stato, checked) end When i have for example posti_ids[ any number], one seat

[Rails] How can I convert an ImageMagick shell script for use in my RoR project?

2014-04-09 Thread Eric Kornmeyer
I'm creating a project that lets users upload images onto products and then buy the products. I'm using Carrierwave and Minimagick. I found this cylnderize script on fmwconcepts. It's a shell script. It is literally perfect for what I need as a lot of the products are mugs. Does anyone know how I

[Rails] Re: How can I convert an ImageMagick shell script for use in my RoR project?

2014-04-09 Thread Eric Kornmeyer
Lol that doesn't wrap an image around a cylinder thanks though -- 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 from it, send an email to

[Rails] Re: Web App looking for a new business model

2014-03-03 Thread Eric Palumbo
apps for sale great prices will take offers too https://www.apptopia.com/listings/7043-2-photo-editing-apps-with-iap-and-ads-one-free-one-paid-for-a-lot-of-potential https://www.apptopia.com/listings/7032-1000-downloads-unblock-me-game-with-trucks-ads-and-iap

[Rails] Re: Best way to securely connect to remote Postgres server from Rails.

2014-02-20 Thread Eric Hayes
Thanks for your insight, Rick. I am the server provider :) On Sunday, February 16, 2014 4:56:32 PM UTC-8, Rick wrote: On Saturday, February 15, 2014 4:46:54 PM UTC-5, Eric Hayes wrote: I'm wonder how most people securely connect to a Postgres database on a server separate from the app

[Rails] Update 'strong_parameters' from 0.1.4 to 0.2.3

2014-02-16 Thread Eric Jefcoat
Hello, Can anyone tell me how to upgrade 'strong_parameters' from 0.1.4 to 0.2.3 on the Terminal? When I use 'update strong_parameters' it tell me that it no longer uses update. When I say upgrade it says command not found. I am using RVM. Thank you so much for your help, Eric -- You

[Rails] RVM group in Terminal

2014-02-16 Thread Eric Jefcoat
Hello, I need to fix some RVM permissions. How do I make sure I'm in the RVM group in the Terminal? Thank you for your help, Eric -- 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

[Rails] Re: RVM group in Terminal

2014-02-16 Thread Eric Jefcoat
When I try to fix permissions, with 'rvm fix-permissions' it tells me that it's fixing them in 'users/group'. I need to fix them in the rvm group but don't know how to fix them IN the rvm group. Thank you for your help, Eric On Sunday, February 16, 2014 9:44:55 PM UTC-7, Eric Jefcoat wrote

[Rails] Best way to securely connect to remote Postgres server from Rails.

2014-02-15 Thread Eric Hayes
I'm wonder how most people securely connect to a Postgres database on a server separate from the app server. The ActiveRecord docs for a MySQL connection have explicit SSL options, whereas with Postgres it seems one would pass SSL options as documented for libpq. However a quick Googling

[Rails] Gem errors

2014-02-07 Thread Eric Jefcoat
::BuildError)* *Permission denied - /usr/local/rvm/gems/ruby-1.9.3-p484/gems/json-1.8.1/ext/json/ext/generator/.gem.20140207-3371-uiaqx9* Any ideas on how to fix this? Thanks in advance for your help. Eric -- You received this message because you are subscribed to the Google Groups Ruby

[Rails] Re: Gem errors

2014-02-07 Thread Eric Jefcoat
NevermindHa! I just ran the same stuff @mpapis told me to do for a seperate permission error and now it seems to be running the rails server just fine. Sheesh. Sometimes the solution is right under your nose. Thanks anyway, Eric On Friday, February 7, 2014 1:24:02 PM UTC-7, Eric Jefcoat

[Rails] rbenv to RVM command equivalencies

2014-02-05 Thread Eric Jefcoat
and rbenv equivalent commands, and have struck out on stuff that would help me understand when Treehouse says this for rbenv, you do this for RVM. Any ideas how I get that help? My thanks to anyone who can help! Eric -- You received this message because you are subscribed to the Google Groups

[Rails] Re: Trouble with RVM permissions when executing a command line 'bundle install'

2014-01-30 Thread Eric Jefcoat
Fred, How do I go about removing rvm? I don't remember setting up a root user password on my computer, When I search Spotlight for rvm, I get some other gem and ruby folders it looks like, but not something named rvm. Thanks for your help, Eric On Thursday, January 30, 2014 3:08:16 AM UTC-7

[Rails] Re: Trouble with RVM permissions when executing a command line 'bundle install'

2014-01-30 Thread Eric Jefcoat
Michael, Thank you for helping. I followed your directions to fix the permissions, and I was able to run the bundle install, without errors! You are the man!! Thank you so much! Eric computer:crumblr admin$ rails server /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems

[Rails] Trouble with RVM permissions when executing a command line 'bundle install'

2014-01-29 Thread Eric Jefcoat
trying to access those files when doing the bundle install, but I thought it was worth mentioning. Thanks in advance to anyone willing to help, Eric -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] Ruby On Rails Getting Started question

2013-12-03 Thread Eric Blow
Hi All, I am going through the getting started guide here http://guides.rubyonrails.org/getting_started.html And in section 5.7 it refers to a code snippet that I don't understand what to do with it. post GET/posts/:id(.:format) posts#show I don't understand if I am supposed to put

[Rails] Re: Retrieve duration (in string format) from database and convert to Ruby syntax for calculation

2013-09-20 Thread Eric Hayes
Take a look at this gem: https://github.com/peleteiro/ruby-duration —it will convert an arbitrary duration (like 1 month, 2 weeks, etc.) into seconds which can be stored in the DB. It is very similar to what Raj is recommending, just a little more formal. Either way you can avoid eval'ing code,

[Rails] Re: How to increase the css and js file loading speed in rails 3

2013-09-20 Thread Eric Hayes
Without the Asset Pipeline, the answer is to send less CSS or JS. With JS you could move as much as possible to the bottom of your HTML and include as few files as possible. On Friday, September 20, 2013 4:49:54 AM UTC-7, chandra sekar wrote: Hi All Right now i am working on rails 3 . Is

Re: [Rails] 3.2.13 breaks localized ActiveScaffold assets compilation

2013-03-19 Thread Yves-Eric
Hi Jeffrey, Awesome, that fixed it, thanks! For anyone facing this issue, the fix is not released yet, so bundle update active_scaffold won't do. You need this: gem active_scaffold, :git = git://github.com/activescaffold/active_scaffold.git, :tag = = v3.3.0.rc3 Thanks again, Yves-Eric

Re: [Rails] 3.2.13 breaks localized ActiveScaffold assets compilation

2013-03-19 Thread Yves-Eric
= v3.3.0.rc3 On Tuesday, 19 March 2013 15:59:07 UTC+9, Yves-Eric wrote: Hi Jeffrey, Awesome, that fixed it, thanks! For anyone facing this issue, the fix is not released yet, so bundle update active_scaffold won't do. You need this: gem active_scaffold, :git = git:// github.com

[Rails] 3.2.13 breaks localized ActiveScaffold assets compilation

2013-03-18 Thread Yves-Eric
::Bridges[:date_picker].localization % And we use Japanese locale. How can we fix this? Thank you, Yves-Eric $ rake --trace assets:precompile ** Invoke assets:precompile (first_time) ** Execute assets:precompile /Users/DEV/.rvm/rubies/ruby-1.9.3-p327-perf/bin/ruby ./bin/rake

[Rails] tfs api from rails

2012-04-18 Thread Eric Stockbridge
does anyone have an idea if there is a way to make calls to the TFS api from a rails app? i think i saw something about team system web access having a soap api that you can use. the reason i ask is I am creating a web ap at work for us to use and we want to be able to add work items to tis and

[Rails] Re: New to Ruby on Rails - Assigning variation (like size or color) to products

2012-02-25 Thread Eric L.
Top 3 book for Rails/Ruby Development 1. The Ruby Programming Language by David Flanagan Yukihiro Matsumoto or 1. Programming Ruby 1.9 (3rd edition): The Pragmatic Programmers' Guide by by Dave Thomas, with Chad

[Rails] Database Issue

2011-12-06 Thread Eric B.
So I'm having an interesting issue with my database and associations. I have three models, Users, Groups, and Roles. They are connected via a join table that has user_id, group_id, and role_id on the same table. A user is in a group, with a role. The same user can be in another group with

[Rails] Optional Dynamic Prepended Route via scope

2011-10-05 Thread Eric Helms
Hello, Say I have the following in my routes file: scope (/:organization) do resources :systems, :except = [:destroy] do member do get :packages end end end resources :dashboard do collection do get :notices end The organization can be changed by the user and

Re: [Rails] Best Rails install for production.

2011-08-18 Thread Eric Björkvall
apache + mod_fcgi - I get better performance than when I tried apache/passenger and apache/mongrel. I'm running this set up under FreeBSD, CentOS 5.x and Mac OS X 10.6 Can be a bit tricky to set up.. Cheers, Eric On 14 aug 2011, at 12:45, Frederick Cheung wrote: On Aug 14, 10:33 am

[Rails] Re: Rails, jquery and Ajax

2011-07-28 Thread Eric Björkvall
(condition %= @condition %); % end % Cheers, Eric -- 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 unsubscribe from

Re: [Rails] Rails, jquery and Ajax

2011-07-28 Thread Eric Björkvall
(condition %= @condition %); % end % Cheers, Eric On 27 jul 2011, at 13:45, Paul Bergstrom wrote: How do I make an ajax call and then update a div with a partial? I've tried this but it's not working. Comment is created but the partial is not loaded. //view a href=# id

Re: [Rails] Nature of Return Values from Search

2011-07-28 Thread Eric Björkvall
Hej You probably should check the params hash in the controller: @skill_search1 = params[:skill1] etc.. Also use a debugger call in the search method to see the parameters that are passed def search debugger . . end Cheers, Eric On 28 jul 2011, at 22.03, Barney wrote: Hello

Re: [Rails] Re: Nature of Return Values from Search

2011-07-28 Thread Eric Björkvall
, Eric On 29 jul 2011, at 00.59, Barney wrote: Hi Eric, I'm using Scite and there doesn't seem to be a debugger in it. How else would I check that hash? But, could you tell me what form (type, value) is the return from that empty text box? Thanks, Barney On Jul 28, 4

Re: [Rails] associations seemed saved in console, but aren't

2011-07-20 Thread Eric Hu
My first guess would be that it has to do with the definitions for the following methods: create_tree_node tree_node.create_definition What happens if, after the IRB code you pasted in, you call c.save Course.all (if that doesn't work, does the following work?) c.interaction_outline.save

Re: [Rails] Re: Printing nested data to screen

2011-07-20 Thread Eric Hu
The original code didn't work because Barney was generating an ActiveRecord Relation. The .find almost worked, except he wanted to embed Ruby code in a SQL statement. This should do it: PeopleSkill.where(people_id = #{@person.id}).find In the future, I think something like Andrew's suggestion

[Rails] QA Analyst - IN

2011-06-13 Thread Eric Hoffman
Dear Associate, This is Eric Hoffman from Panzer Solutions LLC, Let me know if you suitable consultant for below position. If so, send me your updated resume and contact details. *Position: QA Analyst Location : Indianapolis, IN Duration: 12 months* *Rate: $35/hr* Candidates HAVE to have

[Rails] Re: MySql2 adapter hangs in Rails3 on Windows XP

2011-06-10 Thread Eric Norberg
Installing 0.2.6 fixes it. Thanks for information. On Jun 9, 9:38 am, Dhruva Sagar dhruva.sa...@gmail.com wrote: On Thursday 09 June 2011 03:32 AM, Eric Norberg wrote: Previously we've used Rails2.xx with no problems and we're trying to upgrade to ruby 1.9.2p180 and Rails 3.0.7 with pik

[Rails] MySql2 adapter hangs in Rails3 on Windows XP

2011-06-09 Thread Eric Norberg
Previously we've used Rails2.xx with no problems and we're trying to upgrade to ruby 1.9.2p180 and Rails 3.0.7 with pik to keep ruby versions separate. After some initial difficulties with MySql2 gem installation, following a href=http://rorguide.blogspot.com/2011/03/installing-

[Rails] Simple check_box

2011-05-19 Thread Eric M.
Hello, I'm trying create a simple check_box that if checked include a hidden_field, but I haven't success. Something like this: p class=field/p %= check_box_tag(:patrono, value = 1, checked = false, options = {}) % %= f.label Patrono % % if :patrono.checked == true % %=

[Rails] Re: [Form Helpers] Collection_select multiple and accepts_nested_attributes_for

2011-05-19 Thread Eric M.
Try this: %= collection_select(:taggings, :tag_ids, Tag.find(:all), :id, :name, {}, {:multiple = true}) % -- 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

[Rails] Ruby on Rails Engineer - RoR - Software Engineer

2011-04-19 Thread Eric D.
a MacBook Pro on your first day. Send Resume to Eric @ eric.dedomi...@mogreet.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 post to this group, send email to rubyonrails-talk

[Rails] Rails 2.3.7 and content_for problem

2011-03-03 Thread eric
I want to offer control over my app's navigation using multiple yields, which worked fine on my home rails 3 installation, but at work, I'm stuck with an app that uses 2.7, and the same approach isn't working. Basically, I have 3 yields: % yield :navigation% % yield :sidebar % and regular ol'

[Rails] Re: Create super-simple adding application

2010-10-26 Thread Eric R.
Frederick Cheung wrote in post #957392: On Oct 26, 10:48pm, debalmoto debalm...@gmail.com wrote: p %= text_field_tag(:number_one, value = 0) % %= text_field_tag(:number_two, value = 0) % /p p %= @sum % /p That's all of it. Time for HTML lesson 1: if you want inputs to get

[Rails] Re: good hosting for Rails3 ?

2010-09-14 Thread Eric R.
The cheapest rails-friendly host I've come across is Site5. It's like 6 bucks a month if I remember correctly, and you get unlimited storage and bandwidth. I don't think they've updated Rails to 3.0, but according to their blog that should be coming soon. -- Posted via

[Rails] Rails is slow to load

2010-08-04 Thread Eric Yen
Hi, I was just wondering if this was normal or not. I was running ruby 1.8.7 with rails 3 - rc. (Currently trying 1.9.2- rc2 but the same problem) It takes rails a while to load. (a while as in 10-15 seconds) It will take a while before I can use the console , or before running a test or

[Rails] Re: Rails is slow to load

2010-08-04 Thread Eric Yen
That did cross my mind, but I was just wondering though. Mostly because it didn't look as though the transition from running the command to the actual test running wasn't edited. But oh well. On Aug 4, 2:54 pm, Fernando Perez li...@ruby-forum.com wrote: This doesn't seem normal to me when I

[Rails] Re: [ANN] NullDB 0.0.1

2010-08-03 Thread Eric Schmitt
.. provide tools to avoid hitting the database during unit testing for just this reason. I think Rails, and Ruby in general is heading in this direction too. The next generation of ORM databases like DataMapper have this sort of thing built in. Hope this helps! Cheers, Eric -- Posted via http

[Rails] Re: [ANN] NullDB 0.0.1

2010-08-03 Thread Eric Schmitt
like DataMapper have this sort of thing built in. Hope this helps! Cheers, Eric Oh, and I almost forgot to mention that Factory_Girl does this as well. Using Factory.build() you only write to memory and not the database. Factory_Girl can also allow writing to the database for functional

[Rails] Re: [ANN] NullDB 0.0.1

2010-08-03 Thread Eric Schmitt
Marnen, You make some interesting points... I think I still have a ton to learn about unit testing and TDD best practices. I'm still just getting started. Thanks for the info! Warmest Regards, Eric -- Posted via http://www.ruby-forum.com/. -- You received this message because you

[Rails] Re: [ANN] NullDB 0.0.1

2010-08-02 Thread Eric Schmitt
by step as you can give would be great! Cheers, Eric -- 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-t...@googlegroups.com. To unsubscribe from

[Rails] Re: how to update a single table cell using ajax

2010-07-29 Thread Eric Yen
You can alwaus just do the following: td id=descPlaceholder -- 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-t...@googlegroups.com. To unsubscribe from this group, send email to

[Rails] Migration: updating a column

2010-07-29 Thread Eric Yen
Hi, Is there a way to update a column? Here's what I mean: I have a column name item in table products of type integer Now I want to update the column to have the option :null = false So far, the only way I have found is to remove it and re-add it, but obviously that is quite dumb. -- You

[Rails] Re: Migration: updating a column

2010-07-29 Thread Eric Yen
Thanks. I was under the impression that change_column was only for renaming. On Jul 29, 9:19 am, Ar Chron li...@ruby-forum.com wrote: Have you tried change_column in a migration? http://api.rubyonrails.org/classes/ActiveRecord/Migration.html -- Posted viahttp://www.ruby-forum.com/. --

[Rails] Re: Ruby on Rails 3 RC and files in lib directory

2010-07-27 Thread Eric Yen
Hi, Ading config.autoload_paths += %W(#{config.root}/lib) to my application file solved it :) Thank you so much On Jul 27, 5:59 am, stephenjamesmurdoch stephenjamesmurd...@gmail.com wrote: Hi Nicolas, i think I've fixed the problem add the following to your application.rb file:     #

[Rails] Test - Skip Setup

2010-07-27 Thread Eric Yen
to be logged in to create a new user. This is why I want to skip the setup call. Eric -- 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-t...@googlegroups.com. To unsubscribe from this group, send

[Rails] Re: How to update user model attributes and bypass a presence_of validation?

2010-07-20 Thread Eric Hao
why not just use update_attribute ? -- 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-t...@googlegroups.com. To unsubscribe from this group, send

[Rails] Rails 3 - AJAX Response

2010-06-22 Thread Eric Yen
Hi, I need help with some AJAX in rails 3. So basically, I have a select option in my index page for my User model. This select option is a form that modifies the user's type. The :remote = true works and the type is changed when hit the submit button. But, nothing happens in the browser. The

  1   2   3   4   >