[Rails] Vulnerabililty with bootstrap-sass 3.2.0.3

2019-04-03 Thread Jim Ruther Nill
As outlined in https://snyk.io/blog/malicious-remote-code-execution-backdoor-discovered-in-the-popular-bootstrap-sass-ruby-gem/ TLDR If you use bootstrap-sass version 3.2.0.3, just do bundle update bootstrap-sass and you're good to go -- -

Re: [Rails] Why is id off by one or defined different in edit vs in update?

2018-06-08 Thread Jim Ruther Nill
On Sat, Jun 9, 2018 at 5:54 AM, Robert Phillips wrote: > why is id off by one or defined different in edit vs in update? I will > explain what I mean > > I have a controller called Bottles and a model Bottle > > My config\routes.rb file has the line- resources :bottles > > I have this controller

Re: [Rails] override or add stylesheet to mounted engine pages

2018-02-26 Thread Jim Ruther Nill
On Tue, Feb 27, 2018 at 1:32 PM, fugee ohu wrote: > I mounted an engine and it has it's own assets pipeline How do I override > or add to it? It's in a subdirectory under the gem root path > /app/assets/stylesheets/blogit There's no application.css file in the > folder, only other css files I cre

Re: [Rails] Rspec =begin =end

2017-07-11 Thread Jim Ruther Nill
On Tue, Jul 11, 2017 at 9:27 PM, Ralph Shnelvar wrote: > In a file named spec/spec_helper.rb I see > # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration > RSpec.configure do |config| > # The settings below are suggested to provide a good initial experience > # with RSpec, but feel

Re: [Rails] div_for

2017-06-28 Thread Jim Ruther Nill
On Wed, Jun 28, 2017 at 1:38 PM, fugee ohu wrote: > > > On Tuesday, June 27, 2017 at 8:01:40 PM UTC-4, Walter Lee Davis wrote: >> >> >> > On Jun 27, 2017, at 9:12 AM, fugee ohu wrote: >> > >> > >> > >> > On Tuesday, June 27, 2017 at 7:32:33 AM UTC-4, Walter Lee Davis wrote: >> > >> > > On Jun 27

Re: [Rails] passing parameters to delete link_to

2017-06-06 Thread Jim Ruther Nill
On Wed, Jun 7, 2017 at 11:24 AM, Jim Ruther Nill wrote: > > > On Wed, Jun 7, 2017 at 11:21 AM, fugee ohu wrote: > >> The rails scaffolding generator creates delete links as objects in index >> views so why when I google how to pass params to a delete link all the >>

Re: [Rails] passing parameters to delete link_to

2017-06-06 Thread Jim Ruther Nill
On Wed, Jun 7, 2017 at 11:21 AM, fugee ohu wrote: > The rails scaffolding generator creates delete links as objects in index > views so why when I google how to pass params to a delete link all the > answers are examples where a path is used My links don't have a path, they > have an object That'

[Rails] Part time remote work

2017-04-30 Thread Jim Ruther Nill
Hi guys, I'm posting another "looking for remote work" post as things have settled down with the last project. If anyone is looking for a Rails developer with solid experience, just hit me up and let's talk. I can commit around 4 hours a day as I have full time work. Thanks a lot and have a gre

Re: [Rails] migration problems

2017-04-27 Thread Jim Ruther Nill
On Fri, Apr 28, 2017 at 9:17 AM, Joe Guerra wrote: > ok, I'm having difficulty with heroku, they are having some build > problems... > > I'll try later. I guess commenting out the # rename table in change def > should work? > > I was puzzled because the column title started with a capital letter

Re: [Rails] migration problems

2017-04-27 Thread Jim Ruther Nill
On Fri, Apr 28, 2017 at 8:54 AM, Joe Guerra wrote: > Hi, I got stuck on a migration (basically to fix a column name). I > actually went into the table itself and corrected the problem. My herkou > migration gets stuck, and I've got other migrations behind it that aren't > running. > If you've

Re: [Rails] Re: Looking for a part time project

2017-03-31 Thread Jim Ruther Nill
Hi Tariq, I'm available! Just let me know what you need and see what we can set up. Cheers, Jim On Fri, Mar 31, 2017 at 10:33 PM, tariq khan wrote: > Hi Jim, >hope you will be fine, i read your post so i want to contact > you, i need a web developer who working on ruby on rail

Re: [Rails] Re: Looking for a part time project

2017-03-16 Thread Jim Ruther Nill
Hi Falk, I'm definitely interested. My hourly rate is $50/hour. I usually do a trial period involving 1-2 simple tasks. If you're keen, let me know :) On Thu, Mar 16, 2017 at 5:04 PM, FALK LIEDER wrote: > Hi Jim, > > I just saw your post on the Ruby on Rails list, and I have a project that >

[Rails] Looking for a part time project

2017-03-10 Thread Jim Ruther Nill
Hi, I am deeply sorry if this is an inappropriate post for this group. Please disregard if it is. I'm Jim, a Rails developer for about 8 years (turning 9 in May). I'm looking for a part time project that I could work on after office hours as I am away from my family and have an ample amount of

Re: [Rails] DateTime Enumerator

2015-09-26 Thread Jim Ruther Nill
On Sun, Sep 27, 2015 at 4:41 AM, Colin Law wrote: > On 26 September 2015 at 19:29, Jim Ruther Nill wrote: > > hmm maybe relevant > > http://www.benknowscode.com/2014/02/ruby-date-time-range-intervals.html > > Thanks, if I interpret that correctly it is saying that what I a

Re: [Rails] DateTime Enumerator

2015-09-26 Thread Jim Ruther Nill
hmm maybe relevant http://www.benknowscode.com/2014/02/ruby-date-time-range-intervals.html On Sun, Sep 27, 2015 at 12:03 AM, Colin Law wrote: > Can someone explain this for me please? > > range = (DateTime.now..DateTime.now+1.hour).step(10.minute) > => # 17:41:18 +0100:step(600 seconds)> > 2.1.

Re: [Rails] Setting foreign keys, yet record.association_name returning nil

2015-09-05 Thread Jim Ruther Nill
On Saturday, September 5, 2015, Sadaf Noor wrote: > Also posted at stackoverflow: > http://stackoverflow.com/questions/32414734/setting-foreign-keys-at-rails-yet-record-association-name-returning-nil > > ( Please don't downvote ) > > > 2015-09-05 21:22 GMT+06:00 Sadaf Noor >: > >> Please help me

[Rails] shifting to freelance

2014-12-17 Thread Jim Ruther Nill
Hi guys, I am Jim, a Rails developer from the Philippines. I worked as a remote developer for an Australia-based company for 4 years. I've started using Rails around May of 2008 so I have extensive knowledge of old Rails versions. I would like to try out being a full time freelancer so I'm curr

Re: [Rails] Looking for Senior RoR developers for leading IaaS Software vendor

2014-11-07 Thread Jim Ruther Nill
Hi Gavin, you'll need to provide your email if you wish people to reply to you :) On Fri, Nov 7, 2014 at 5:01 PM, Gavin Marriott wrote: > Are you a skilled Ruby on Rails Developer? Then our client would love to > hear from you. > My client is a global Pre-IPO company with four offices worldwide

Re: [Rails] Using Dropbox in Rails

2014-11-01 Thread Jim Ruther Nill
I think I've tried the gem before but have since switched to the chooser solution since it was a lot easier to implement. In your case, since you want to save to the user's dropbox folder, just use the saver solution https://www.dropbox.com/developers/dropins/saver On Sun, Nov 2, 2014 at 7:07 AM,

Re: [Rails] One huge table or separate tables? design issue

2014-10-12 Thread Jim Ruther Nill
you can also run a task that archives past dates to a duplicate table since you'll rarely need them. maybe you can keep 1 month data in the table that you're writing to. this way, you won't have to worry about the exponential growth of the table you're always accessing. On Sun, Oct 12, 2014 at 7:

Re: [Rails] Scaling/optimizing a slow ruby on rails application.

2014-07-23 Thread Jim Ruther Nill
On Wed, Jul 23, 2014 at 10:59 AM, Michael Solovyov wrote: > Hi everyone, > > > > My name is Michael Solovyov and I'm the co-founder & CTO of a > rails-based start-up. We have built a product for other businesses to help > their users adopt their products. > > > > We've built the application, d

Re: [Rails] ruby on rails

2014-07-15 Thread Jim Ruther Nill
On Wed, Jul 16, 2014 at 1:13 AM, Carlo Giustinoni < carlo.giustin...@gmail.com> wrote: > this is the worst installation package I have ever encountered, I > installed using www.railsinstaller.org, I installed the VS2010 shell, > when I try to generate script for anew project I get this error > > S

Re: [Rails] Morons in our midst (re: "important news")

2014-05-27 Thread Jim Ruther Nill
+1 I think it's not important news if Rails is gay or not On Wed, May 28, 2014 at 11:16 AM, Ken D'Ambrosio wrote: > Hi, all. I'm not a frequent contributor -- I'm just ramping up on Rails. > But I've been on the 'Net for quite some time. And back in the days of > yore, on Usenet, we had mode

Re: [Rails] How to get around a reserved word

2014-03-05 Thread Jim Ruther Nill
On Wed, Mar 5, 2014 at 9:32 PM, Walter Lee Davis wrote: > > On Mar 5, 2014, at 6:40 AM, Frederick Cheung wrote: > > > > > > > On Wednesday, March 5, 2014 7:02:34 AM UTC, Walter Lee Davis wrote: > > I need to use the model name 'Action' (which will not work in Rails > 4.0.3) for business reasons (

Re: [Rails] Asset pre-compilation unbearably slow: Have we outgrown asset pipeline?

2013-06-27 Thread Jim Ruther Nill
On Fri, Jun 28, 2013 at 12:11 AM, Bryan Migliorisi wrote: > Our application is a very large (read: "enterprise") Single Page > Application. > > Even though our app is 99% client side with a Java RESTful API, we built > the web application on top of rails because the Asset Pipeline seemed like > a

Re: [Rails] Looping through hash and sub-hash.

2013-06-19 Thread Jim Ruther Nill
On Thu, Jun 20, 2013 at 10:30 AM, Patrick Curl wrote: > # Need a little push in the right direction. > @prices = [ > "amazon_new" => [ > "image" => "imageurl.com", > "url" => "bookurl.com", > "price" => 45.55 > ], > > "amazon_used" => [ >

Re: [Rails] Paperclip thumbnail generation uses magic?

2013-06-12 Thread Jim Ruther Nill
I haven't seen the paperclip code but I think you can look at the preprocessors used by default by paperclip. You usually see logs when paperclip does some processing using rmagick which may be a clue as to what part of the lib you want to look at. On Wed, Jun 12, 2013 at 11:15 PM, Walter Lee Dav

Re: [Rails] Re: How to run view helpers from rails console?

2013-05-29 Thread Jim Ruther Nill
i think you can also use app for the url_helpers app.posts_path for example On Thu, May 30, 2013 at 2:21 PM, Frederick Cheung < frederick.che...@gmail.com> wrote: > > > On Wednesday, May 29, 2013 10:25:59 PM UTC+1, Ruby-Forum.com User wrote: >> >> With >> > rails console --sandbox >> I cant tes

Re: [Rails] Why does Hash#values_at not working?

2013-04-30 Thread Jim Ruther Nill
p h.values_at[*ar] should be p h.values_at(*ar) On Wed, May 1, 2013 at 12:50 PM, Love U Ruby wrote: > While the below code working :- > > > m = {:a => 2, :b => 3,:c => 44,:g => 14} > a = [:a,:b,:g] > p m.values_at(*[:a,:b,:g]) #=> [2, 3, 14] > > why the below not working? > > h = { > 'arg0'

Re: [Rails] joining 2 tables

2013-01-31 Thread Jim Ruther Nill
On Thu, Jan 31, 2013 at 9:52 PM, Fabian Peter wrote: > Hello, > > I'm trying to join 2 tables with ruby on rails 3.2. > > rails generate model product name:string > rails generate model price product_id:integer price:integer > date:datetime > > product.rb: > class Product < ActiveRecord::Base >

[Rails] Shameless plug

2013-01-30 Thread Jim Ruther Nill
Hey guys, If you have time to read something today, please visit the latest entry on NetEngine's blog. http://netengine.com.au/blog/learning-while-conducting-the-triggerapp-upgrade/ This will grant me a case of beer if I gain at least 60 views today. hehe Thanks! -- ---

Re: [Rails] case study

2013-01-30 Thread Jim Ruther Nill
On Thu, Jan 31, 2013 at 7:08 AM, oto iashvili wrote: > hi > > thanks for answer sorry I quite new in RoR. If I do how u said, will I > have to validate "manually" all the attributes for details ? > Now that you've asked that, I'm not sure. You can try to use validates_associated and use a before

Re: [Rails] Multiple forms to create multiple records for multiple users

2013-01-30 Thread Jim Ruther Nill
On Wed, Jan 30, 2013 at 5:34 PM, Abdullah Esmail wrote: > Hello. > I have come across a scenario where I need to save multiple records for > multiple users on the same page. > > User has_many :shifts > Shift belongs_to :user > > I need to show multiple shifts for each user on the same page and the

Re: [Rails] case study

2013-01-30 Thread Jim Ruther Nill
On Wed, Jan 30, 2013 at 6:48 PM, oto iashvili wrote: > I want to do > @ad = Ad.attributes(params[:ad]) > maybe Im wrong, but as I understood about polymorphic in rails, this would > thow an error say that ad_real_estate_details does not exist > > as they explained here http://stackoverflow.** > c

Re: [Rails] case study

2013-01-29 Thread Jim Ruther Nill
On Tue, Jan 29, 2013 at 7:41 PM, oto iashvili wrote: > Hi, > > thanks for answer. My pb with polymorphic is that I would have to create > first in db a ligne for ad_real_estate_details and then create my ad, what > is non sense for me, in terms of logic. > and it might brings some pb as I read the

Re: [Rails] case study

2013-01-27 Thread Jim Ruther Nill
On Mon, Jan 28, 2013 at 6:27 AM, oto iashvili wrote: > hi, > > i' trying to re-create my project from php to rails. But now Im faced with > a pb to witch I had solution with php, but I cant figure how to make it > work with rails > > here my tables > > ads > id > category_id > title > text

Re: [Rails] Best practice to handle this

2013-01-26 Thread Jim Ruther Nill
On Sat, Jan 26, 2013 at 8:58 PM, Linus Pettersson < linus.petters...@gmail.com> wrote: > Hi! > > I have a model which has a field that can have three values only. I store > the value in the database as an integer, 0, 1 or 2, but when I display it I > want a more appropriate text. And, I want it to

Re: [Rails] group by + sum

2013-01-25 Thread Jim Ruther Nill
On Fri, Jan 25, 2013 at 9:42 PM, Werner wrote: > Well.. I cant get it working > > Try to explain it again.. > > db_table: > week_id, project_id, user_id, hour > ex. => > 33, 1, 1, 10 > 33, 4, 1, 20 > 33, 1, 2, 0 > 34, 1, 2, 15 > 34, 1, 1, 0 > > > So, user with the id 1 worked 10 hours in week 33 a

Re: [Rails] I am trying to add a block dynamically. I is giving an error saying “wrong no. of arguments”(1 for 2

2013-01-24 Thread Jim Ruther Nill
On Fri, Jan 25, 2013 at 3:47 PM, suchi gupta wrote: > <%render :partial =>'new_campaign_partial'%> > > > <%= link_to_function "Add a campaign" do |page| > inser_html :bottom, :new_campaign, :partial=>'new_campaign_partial' >end%> > If I remember correctly, link_to_function does not

Re: [Rails] Re: Add Multiple Records of a model using single form

2013-01-24 Thread Jim Ruther Nill
On Thu, Jan 24, 2013 at 10:49 PM, BalaRaju Vankala wrote: > Thank you @Werner its Working. > > > On Thu, Jan 24, 2013 at 7:59 PM, Werner > wrote: > >> something like that: >> >> *<% 1.upto(2) do |i| %> >> <%= text_field_tag "fields[#{i}][user_name]",'', :class => "user_name" %> >> <%= radio_butto

Re: [Rails] group by + sum

2013-01-24 Thread Jim Ruther Nill
On Thu, Jan 24, 2013 at 10:38 PM, Werner wrote: > Jim..sorry.. not my day... > have to contemplate about your solution. > > I wonder.. > > HourUser.includes(:user).where.group_by { |h| h.week_id } > > <% @hours.keys.sort.each do |h| %> > <%= @hours[h].collect(&:hour).sum %> > <% end %> > > is

Re: [Rails] group by + sum

2013-01-24 Thread Jim Ruther Nill
On Thu, Jan 24, 2013 at 7:55 PM, Werner wrote: > Hi Jim.. thanks so far.. > > in the moment this is a bit too far for me. > > > Just remember that to get a certain value, you'll have to pass an array as > the index > ie sums[[33,2]] to get 70 > => this is unclear > Pls. be so kind to explain the v

Re: [Rails] group by + sum

2013-01-24 Thread Jim Ruther Nill
On Thu, Jan 24, 2013 at 4:35 PM, Werner wrote: > Hi.. I need some support... > > table: > week_id, user_id, project_id, hours > ex. => > 33, 2, 1, 10 > 34, 2,1,15 > 33, 2, 2, 20 > 35, 3, 1,20 > etc. > Want to display a sum of hours per week_id per user_id > I have: > > @hours = HourUser.includes

Re: [Rails] Newbie: I just want to exclude two attributes when I call update_attributes

2013-01-20 Thread Jim Ruther Nill
On Mon, Jan 21, 2013 at 2:50 AM, Dheeraj Kumar wrote: > You still haven't shown us what's in params[:foo] and the exact error you > get. > > -- > Dheeraj Kumar > > On Monday 21 January 2013 at 12:07 AM, Don Schenck wrote: > > > And in the Create method as well. > > This FEELS wrong, but it works.

Re: [Rails] Setting image

2013-01-17 Thread Jim Ruther Nill
On Thu, Jan 17, 2013 at 9:52 PM, Avi wrote: > The requirement is:- > > When we click on the button to choose the file, after choosing, the image > should be shown in the ui in IFRAME or something. > Not sure how to do that... > this is a shameless plug but you can look at my blog if you need hel

Re: [Rails] Setting image

2013-01-17 Thread Jim Ruther Nill
On Thu, Jan 17, 2013 at 6:27 PM, Avi wrote: > Hello All, > > I am uploading an image from disc. While choosing the image I want to show > that image on the UI. > How can I do that? > I am using paperclip gem. > before html5, i think this is not possible since javascript shouldn't have access to

Re: [Rails] Drag & drop

2013-01-15 Thread Jim Ruther Nill
On Wed, Jan 16, 2013 at 2:32 PM, Avi wrote: > Hello All, > > Is there any gem which provides drag & drop facility in rails 3.2.8? > I want to show data in grid view. & I want to drag & drop & change the > positions of those.. > Any suggestions ? > look at jquery ui draggable, droppable and sorta

Re: [Rails] Re: Nested models in a form

2013-01-13 Thread Jim Ruther Nill
On Mon, Jan 14, 2013 at 5:15 AM, Rafael C. de Almeida wrote: > Let me send you another post the intention of documenting this issue for > people from the future. The solution I'm going with for now is: > substituting "???" for lf.object_name+"[service_ids][]". It may not be too > pretty, but it wo

Re: [Rails] Good books about the internals of Rails 3

2013-01-10 Thread Jim Ruther Nill
On Thu, Jan 10, 2013 at 10:50 PM, Maciej Rząsa wrote: > @Norbert Thanks for the constructive answer! I'm glad you noticed that > there is no difference between using two-year-old PC and two-year-outdated > web framework! > > More seriously: changes between RoR2 and RoR3 were quite significant, so

Re: [Rails] CSRF resets my session in Firefox

2013-01-09 Thread Jim Ruther Nill
On Thu, Jan 10, 2013 at 4:18 AM, Jeff Miller wrote: > Hello all, > I've been trying to diagnose an issue with CSRF and Firefox > specifically. I've got an ajax based form, using UJS (yes, I have > csrf_meta_tag in my layout and I've tried adding the X-CSRF-Token header > to the ajax beforeSend

Re: [Rails] Need User All login and logout times

2013-01-01 Thread Jim Ruther Nill
On Wed, Jan 2, 2013 at 3:44 PM, Saravanan P wrote: > May be if your open private window and signin. > Then without signout, the user close browser my code (i.e "after sign out" > method) will not run and i cant get sign out time... thats why i said... > you can get around this by using javascript

Re: [Rails] Need User All login and logout times

2013-01-01 Thread Jim Ruther Nill
On Wed, Jan 2, 2013 at 3:20 PM, Dheeraj Kumar wrote: > Why don't you think its a good way? > > -- > Dheeraj Kumar > > On Wednesday 2 January 2013 at 12:45 PM, Saravanan P wrote: > > Hi Dheeraj > > Thanks for reply. > In Trackable, i can only see total sign in count, last sign in time and > sign ou

Re: [Rails] Passing parameter from a dropdown.

2012-12-21 Thread Jim Ruther Nill
Sent from my iPhone On 21/12/2012, at 8:32 PM, Avi wrote: > Somehow I did manage to pass the parameter from the dropdown to controller. > But the problem is here - I am getting it as string. > > In Controller: > > class ReportController < ApplicationController > > REPORT1 =

Re: [Rails] Disable back button of browser

2012-12-20 Thread Jim Ruther Nill
On Fri, Dec 21, 2012 at 3:10 PM, Ashokkumar Yuvarajan < ashokku...@shriramits.com> wrote: > Thanks! > > Is there any another way?? > Nope. > > My requirement is, once i clicks the browser back button my site *redirect > to home page*. > > Please advice! > If there is a way, this is not the for

Re: [Rails] Passing parameter from a dropdown.

2012-12-20 Thread Jim Ruther Nill
On Fri, Dec 21, 2012 at 2:46 PM, Avi wrote: > Sorry for late reply... > > Can't we pass the param through ajax or js ? > yes you can. you have to read on ajax. > > > On Thursday, December 20, 2012 11:50:37 AM UTC+5:30, jim wrote: >> >> >> >> >> On Thu, Dec 20, 2012 at 1:45 PM, Avi wrote: >> >

Re: [Rails] Disable back button of browser

2012-12-20 Thread Jim Ruther Nill
On Fri, Dec 21, 2012 at 2:32 PM, Maddy wrote: > Hi Folks, > > Good Day, > > *How to disable back button of browser??* > you cant. > > Please advise! > > Thank You. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to thi

Re: [Rails] two things seem to equal, but the UNLESS statement passes anyway.

2012-12-20 Thread Jim Ruther Nill
On Thu, Dec 20, 2012 at 6:58 PM, Jim Ruther Nill wrote: > > > > On Thu, Dec 20, 2012 at 6:47 PM, Binny Zupnick wrote: > >> when params[:which_post] happens to equal the users last message, the >> UNLESS staement on line 11 passes when in fact they both equal. I'v

Re: [Rails] two things seem to equal, but the UNLESS statement passes anyway.

2012-12-20 Thread Jim Ruther Nill
On Thu, Dec 20, 2012 at 6:47 PM, Binny Zupnick wrote: > when params[:which_post] happens to equal the users last message, the > UNLESS staement on line 11 passes when in fact they both equal. I've > done testing and I know the params work and they do in fact equal each > other, but it still passe

Re: [Rails] Passing parameter from a dropdown.

2012-12-19 Thread Jim Ruther Nill
On Thu, Dec 20, 2012 at 1:45 PM, Avi wrote: > I am not adding any form because there is no model for this page. > Only there is controller and view. > you need to add a form to pass the selected values to the controller. It doesn't matter whether you're accessing a model or not. > > On Thursd

Re: [Rails] Passing parameter from a dropdown.

2012-12-19 Thread Jim Ruther Nill
On Thu, Dec 20, 2012 at 12:53 PM, Avi wrote: > Hello, > > I have a dropdown in the UI. There are many oprions. > How do I send the parameter from the dropdown - the selected value to the > controller? > > I have tried :- > > 1. <%= select_tag 'name', options_for_select(@list, :selected) %> > 2. <

Re: [Rails] callbacks

2012-12-17 Thread Jim Ruther Nill
On Mon, Dec 17, 2012 at 10:15 PM, Avi wrote: > Hello All, > > I have two tables: > user has_many room > room belongs_to user > > When a new user is created, I want to save the room through some default > values at the same time. > How to do this by using callbacks? > > after_save or after_create

Re: [Rails] save 2 value in diffrent field in one field at database

2012-12-16 Thread Jim Ruther Nill
Sent from my iPhone On 16/12/2012, at 11:53 AM, Mas Bejo wrote: > i want to get value from 2 diffrent field, first > from text_field, and second from select_date, and i want to save it in > one field "TTL" in database, this is the syntax, > i change my model file to be like this: > > class An

Re: [Rails] Re: Combo Box in rails and save 2 value in diffrent field in one field at database

2012-12-15 Thread Jim Ruther Nill
On Sat, Dec 15, 2012 at 8:34 PM, Mas Bejo wrote: > i get this syntax > > <%=select_tag :Status, options_for_select(%w{ Perempuan Laki-Laki > })%> > > but, i didn't work, i just need to get value from that combobox, and > send it to query insert to field "Status" in database, but when i try r

Re: [Rails] Combo Box in rails and save 2 value in diffrent field in one field at database

2012-12-14 Thread Jim Ruther Nill
On Sat, Dec 15, 2012 at 12:24 PM, Mas Bejo wrote: > i have problem to make combobox in rails can you help me. > i try this syntax > <%= f.select(:Status) %> > > Status is my field in database that have 2 value "perempuan" and > "laki-laki". but i always got error in my rails > i don't understand

Re: [Rails] has_many :through

2012-12-14 Thread Jim Ruther Nill
On Sat, Dec 15, 2012 at 7:48 AM, Jean wrote: > I'm new in rails and I've some doubts about what kind of relationship do I > have to use. Here the case. > > I have two models Offer and User, a user could apply to many offers and > offers can have many user also the users create the offers. > > I t

Re: [Rails] Re: make rails connect with database

2012-12-14 Thread Jim Ruther Nill
On Fri, Dec 14, 2012 at 6:16 PM, Mas Bejo wrote: > owh, i see.. i forgot that command. i have been try that command in > other app (but when i create database via rails), but i forgot to try > this command in this app. > > > so, this the step, i try to run this: > > "rails console" > > and then i

Re: [Rails] Re: make rails connect with database

2012-12-13 Thread Jim Ruther Nill
On Fri, Dec 14, 2012 at 2:10 PM, Mas Bejo wrote: > i didn't understand your instruction. what must i run in console? did > you mean "rails server"? or what else? > i mean rails console. http://guides.rubyonrails.org/command_line.html#rails-console you really need to go through a tutorial first

Re: [Rails] Re: make rails connect with database

2012-12-13 Thread Jim Ruther Nill
On Fri, Dec 14, 2012 at 11:41 AM, Mas Bejo wrote: > 1. Rails new First_app > 2. Change config database.yml > 3. Rake db:schema:dump > 4. Rails g scaffold Anggota –migration false > 5. Change First_app\app\model\anggotum.rb with this syntax > > - > class A

Re: [Rails] Re: make rails connect with database

2012-12-13 Thread Jim Ruther Nill
On Fri, Dec 14, 2012 at 10:24 AM, Mas Bejo wrote: > no, i didn't use member table, i use member word just to describe to you > singular and plural form. because i little confuse tell you plural form > from word "anggota" > ok. Just make sure that you're using the table name on the db on the Ang

Re: [Rails] Re: make rails connect with database

2012-12-13 Thread Jim Ruther Nill
On Fri, Dec 14, 2012 at 10:14 AM, Mas Bejo wrote: > class AnggotaController < ApplicationController > # GET /anggota > # GET /anggota.json > def index > @anggota = Anggotum.all > > respond_to do |format| > format.html # index.html.erb > format.json { render json: @anggot

Re: [Rails] Re: make rails connect with database

2012-12-13 Thread Jim Ruther Nill
On Fri, Dec 14, 2012 at 9:58 AM, Mas Bejo wrote: > i try to add this syntax > > set_table_name "member" > > in member.rb at folder app\models\ > > but same as before it can't show record in table member, and i try to > click new member, i saw this error > > "ActiveRecord::StatementInvalid in Memb

Re: [Rails] Re: make rails connect with database

2012-12-13 Thread Jim Ruther Nill
On Fri, Dec 14, 2012 at 9:33 AM, Mas Bejo wrote: > did you mean add this syntax > > set_table_name "member" > > in app\models\member.rb?? > > i have been try it, but it didn't work.. > well just saying it didn't work won't help you at all. describe what happens and why you concluded it didn't

Re: [Rails] Re: make rails connect with database

2012-12-13 Thread Jim Ruther Nill
On Thu, Dec 13, 2012 at 11:22 PM, Mas Bejo wrote: > I always see, every table in rails given the name of the plural form. > however I have a table with a singular form. let say my table name > "member" not "members", could this create problems? > then the rails command writing table name usually

Re: [Rails] Filter on multiple select

2012-12-13 Thread Jim Ruther Nill
On Thu, Dec 13, 2012 at 10:23 PM, Lorenz Blackbird wrote: > Hello, > > I have a many-to-many relationship between the model "exams" and the > model "students", in the middle I have the model "registrations". > > Students are registered to a "course" (another model) and any exam is > associated to

Re: [Rails] Re: make rails connect with database

2012-12-13 Thread Jim Ruther Nill
On Thu, Dec 13, 2012 at 5:38 PM, Mas Bejo wrote: > i can't understand this command > "rails g scaffold --migration false" > > can you describe it more? > if you have a table called comments in your current database, and you want to generate the model, controller and views for that table, you ne

Re: [Rails] change development database

2012-12-13 Thread Jim Ruther Nill
On Thu, Dec 13, 2012 at 12:01 AM, Nehemiah Dacres wrote: > I accidentally chose the wrong database name for an existing i want to use > in development. I changed the name in database.yaml but I still get the > same error > "Mysql2::Error: PROCEDURE test.NADAnnotation_All_S does not exist: call >

Re: [Rails] Thin server giving Stack level too deep error

2012-12-12 Thread Jim Ruther Nill
On Thu, Dec 13, 2012 at 1:56 PM, sumit srivastava < sumit.theinvinci...@gmail.com> wrote: > On 13 December 2012 11:23, Jim Ruther Nill wrote: > >> >> >> >> On Thu, Dec 13, 2012 at 1:48 PM, sumit srivastava < >> sumit.theinvinci...@gmail.com> wr

Re: [Rails] Thin server giving Stack level too deep error

2012-12-12 Thread Jim Ruther Nill
On Thu, Dec 13, 2012 at 1:48 PM, sumit srivastava < sumit.theinvinci...@gmail.com> wrote: > > On 13 December 2012 11:17, sumit srivastava > wrote: > >> >> On 13 December 2012 11:13, Jim Ruther Nill wrote: >> >>> >>> >

Re: [Rails] Thin server giving Stack level too deep error

2012-12-12 Thread Jim Ruther Nill
On Thu, Dec 13, 2012 at 1:31 PM, Sumit Srivastava < sumit.theinvinci...@gmail.com> wrote: > Hi, > > I am using thin web server in my rails project. But it gives stack level > too deep error. Couldn't find any appropriate solution to this. > I have tried updating the ruby but didn't help. > can yo

Re: [Rails] Re: make rails connect with database

2012-12-12 Thread Jim Ruther Nill
On Thu, Dec 13, 2012 at 11:22 AM, Mas Bejo wrote: > i try open schema.rb, and i saw this code > > ActiveRecord::Schema.define(:version => 20121201063411) do > > create_table "anggota", :force => true do |t| > t.string "nama" > t.text

Re: [Rails] make rails connect with database

2012-12-12 Thread Jim Ruther Nill
On Thu, Dec 13, 2012 at 10:54 AM, Mas Bejo wrote: > i'm newbie in rails. i have problem with how to connect rails with > database. before i can connect it with command > "rake db:create" to create database. > and "rake db:migrate" to migrate schema to database. > but, i want to connect rails wi

Re: [Rails] Nested Form with Add/Remove Attributes Button.

2012-12-12 Thread Jim Ruther Nill
On Thu, Dec 13, 2012 at 6:18 AM, fuzzy wrote: > Hi, > > I finally, w/paid help, got my nested form working such that the add/ > remove attributes button works. > > > Now I am wondering if it is possible to only have the 'remove' > attributes button, only show up after the first row of attributes.

Re: [Rails] Adding a hyperlink to a pop-up window on a form field label in Rails

2012-12-11 Thread Jim Ruther Nill
On Wed, Dec 12, 2012 at 10:47 AM, Walter Lee Davis wrote: > > On Dec 11, 2012, at 7:12 PM, scottc wrote: > > > Is there a way to embed a hyperlink in a form label in Rails using > link_to? > > > > I am trying to do this in a form field as follows: > > > > <%= f.label "Accept Terms of Service?" %>

Re: [Rails] Re: Values not being being reflected on page after validation error but model has the values

2012-12-10 Thread Jim Ruther Nill
On Mon, Dec 10, 2012 at 3:45 PM, Jim Ruther Nill wrote: > > > > On Mon, Dec 10, 2012 at 3:42 PM, rubyrookie wrote: > >> Thank you very much. I will read up on the difference. Sorry should have >> bolded my answers. > > > No worries. If you're loo

Re: [Rails] Re: Values not being being reflected on page after validation error but model has the values

2012-12-09 Thread Jim Ruther Nill
On Mon, Dec 10, 2012 at 3:42 PM, rubyrookie wrote: > Thank you very much. I will read up on the difference. Sorry should have > bolded my answers. No worries. If you're looking for the difference, @payment (as you already know) uses the same record as the one you have in your controllers. If

Re: [Rails] Conditional background color of rows

2012-12-09 Thread Jim Ruther Nill
On Mon, Dec 10, 2012 at 3:34 PM, Sumit Srivastava < sumit.theinvinci...@gmail.com> wrote: > Hi, > > I am using dataTables to render my content onto a view. I need to change > the background color of a row depending upon ratio of values of two > columns. How shall I proceed. I went through followin

Re: [Rails] Re: Values not being being reflected on page after validation error but model has the values

2012-12-09 Thread Jim Ruther Nill
On Mon, Dec 10, 2012 at 3:16 PM, rubyrookie wrote: > > > On Sunday, December 9, 2012 11:08:57 PM UTC-8, jim wrote: > >> >> >> >> On Mon, Dec 10, 2012 at 2:26 PM, rubyrookie wrote: >> >>> No error . Validation error is populated but form does not retain >>> values. Payment object has the values t

Re: [Rails] Re: Values not being being reflected on page after validation error but model has the values

2012-12-09 Thread Jim Ruther Nill
On Mon, Dec 10, 2012 at 2:26 PM, rubyrookie wrote: > No error . Validation error is populated but form does not retain values. > Payment object has the values though. > This is still confusing. What exactly do you want to do? - Show the validation errors on the form page? - Fix the payme

Re: [Rails] Values not being being reflected on page after validation error but model has the values

2012-12-09 Thread Jim Ruther Nill
On Mon, Dec 10, 2012 at 1:53 PM, rubyrookie wrote: > I have a relationship where a merchant can have multiple payments. I am > posting payments to a merchant and there is a validation error. Payment > object does have the values retained. Can some one help me fix the issue? > > View Code-> > > <%

Re: [Rails] link_to popup

2012-12-09 Thread Jim Ruther Nill
On Mon, Dec 10, 2012 at 12:55 PM, avinash behera wrote: > Should we use javascript ot jquery to achieve this? I remember in rails 2 that link_to has a popup option which opens a new window. Looking at the api right now, the option was removed. so I guess you may need to implement your own js s

Re: [Rails] Joining two tables giving ambigous column error on mysql

2012-12-06 Thread Jim Ruther Nill
On Fri, Dec 7, 2012 at 3:17 PM, sumit srivastava < sumit.theinvinci...@gmail.com> wrote: > On 7 December 2012 10:05, Jim Ruther Nill wrote: > >> >> >> >> On Fri, Dec 7, 2012 at 12:20 PM, Sumit Srivastava < >> sumit.theinvinci...@gmail.com> wr

Re: [Rails] Joining two tables giving ambigous column error on mysql

2012-12-06 Thread Jim Ruther Nill
On Fri, Dec 7, 2012 at 12:20 PM, Sumit Srivastava < sumit.theinvinci...@gmail.com> wrote: > Hi, > > I am doing a join of two tables with a column with same name in both. I am > using "includes" to have a full join. This is giving ambiguous column > error. The columns cannot be removed from either

Re: [Rails] copy common attributes

2012-12-06 Thread Jim Ruther Nill
On Fri, Dec 7, 2012 at 9:30 AM, renu mehta wrote: > Hello, > > If I have a model A as : > > name > address > phone > > and model B as: > > name > address > email > > Is it possible to copy a record from A to B with one statement? I am > trying : > > @a=A.find(2) > a_attributes=@a.attributes > a_a

Re: [Rails] access json data from rails controller in ajax call and process it

2012-12-05 Thread Jim Ruther Nill
On Wed, Dec 5, 2012 at 7:02 PM, ruby rails wrote: > I am building a Task Management System and have implemented > fullcalendar.js in it. I need to get the pending tasks and change the > color of those pending tasks. I am getting the instance variable of > pending tasks details in the rails contro

Re: [Rails] Abridged summary of rubyonrails-talk@googlegroups.com - 37 Messages in 16 Topics

2012-12-04 Thread Jim Ruther Nill
On Wed, Dec 5, 2012 at 8:20 AM, Jordon Bedwell wrote: > On Tue, Dec 4, 2012 at 5:09 PM, Arpit Prasad > wrote: > > We are seeking a front-end Rails developer who has experience developing > > consumer facing web sites. > > You should also probably hire an IT team that can teach you how to > creat

Re: [Rails] create conditions in model

2012-12-03 Thread Jim Ruther Nill
On Tue, Dec 4, 2012 at 11:46 AM, Jim Ruther Nill wrote: > > > > On Mon, Dec 3, 2012 at 6:26 AM, Jean wrote: > >> Hello guys, >> >> I trying to create the conditions of my search, but I have some troubles. >> >> This is the method I'm trying to

Re: [Rails] create conditions in model

2012-12-03 Thread Jim Ruther Nill
On Mon, Dec 3, 2012 at 6:26 AM, Jean wrote: > Hello guys, > > I trying to create the conditions of my search, but I have some troubles. > > This is the method I'm trying to create in my model. > > def self.searchadv(title, place, category, date) > !title.blank? ? conditions = ['title LIKE ?',

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

2012-11-30 Thread Jim Ruther Nill
On Fri, Nov 30, 2012 at 4:56 PM, sumit srivastava < sumit.theinvinci...@gmail.com> wrote: > On 30 November 2012 14:16, Colin Law wrote: > >> On 30 November 2012 06:50, sumit srivastava >> wrote: >> > Verified it. Don't have puts anywhere else. >> >> Jim asked you to post the contents of the log

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

2012-11-29 Thread Jim Ruther Nill
mit 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: >> >&g

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

  1   2   3   4   >