[Rails] Re: [Feature idea] Truncating timestamp precision

2014-10-06 Thread Robert Walker
Agis A. wrote in post #1159152: Of course I can. I wanted to know if this seems useful to other people using Rails so I can start to work on this feature. This doesn't feel to me like the sort of feature that warrants inclusion in ActiveSupport. There are a multitude of possible functions

[Rails] Re: Multiple domains

2014-08-20 Thread Robert Walker
http://api.rubyonrails.org/classes/ActionDispatch/Request.html#method-i-original_url # get /articles?page=2 request.original_url # = http://www.example.com/articles?page=2; -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups

[Rails] Re: SyntaxError on has_many association with block when trying to order

2014-08-18 Thread Robert Walker
Antonio Moreno wrote in post #1155440: Now, I want to order the associated records: has_many :children, dependent: :destroy, - { order 'id asc' } do but this raises an error: SyntaxError in ParentsController#index has_many :children, dependent: :destroy, - { order 'id asc' } do This line

[Rails] Re: What is the question mark inside this regex doing?

2014-08-15 Thread Robert Walker
'John Merlino' via Ruby on Rails: Talk wrote in post #1155178: I thought the ? matches zero or one occurrence of a pattern. However in this example: def show_regexp(string, pattern) match = pattern.match(string) if match #{match.pre_match}-#{match[0]}-#{match.post_match} else

[Rails] Re: custom button. How to do this ?

2014-08-12 Thread Robert Walker
Roelof Wobben wrote in post #1154953: For my project I need a button which produces this in html ; button class=btn btn-blue type=submitSubmit/button I tried already button tag and content_tag but also that did not produce the output as I expected. The button_tag signature:

[Rails] Re: Where do I place the javascript file that is only required for one (or just a few) view(s)?

2014-08-07 Thread Robert Walker
unknown wrote in post #1154022: Hi all, Sorry if this has already been discussed, but I haven't found any post matching what I'm looking for. (If there is, please point me to it!) I'd like to include a javascript in the header section, but just for one view. I went through the guides and

[Rails] Re: How increase efficiency in develop

2014-08-05 Thread Robert Walker
Alex Korolev wrote in post #1154236: Hello. May you share your approach to increase efficiency. I can do a application on Ror but often I must remind information in help. So my speed is very low. Do you have some tricks or I must write more code (more projects) and remember all? Many

[Rails] Re: Session record not getting deleted

2014-08-04 Thread Robert Walker
Bharath Neo wrote in post #1154181: Hi, I have been asking this question in multiple forums like stackexchange but have not received a solution or proper help. Any help here is appreciated. I have a rails app with a session store database (mysql). When I want to clear a session, I reset the

[Rails] Re: Executing ruby script before rails gets loaded

2014-08-04 Thread Robert Walker
Martin Ennemoser wrote in post #1154169: I have a ruby script which instruments Net::HTTP requests in Rails applications. This works as follows: When Ruby loads the Net::HTTP class, I alias the request method. At every http request, my instrumented method gets executed. So that this works, I

[Rails] Re: Javascript call in mail Url

2014-07-31 Thread Robert Walker
Walter Davis wrote in post #1153927: On Jul 31, 2014, at 8:47 AM, Colin Law wrote: Also, if you expect a JavaScript to execute in a mail client (Outlook, Gmail, Mail.app) you will be waiting a very long time. That door is bolted securely shut for very good reason. If I'm not mistaken this is

[Rails] Re: Your opinion on which technologies to use when building web applications

2014-07-25 Thread Robert Walker
Master Thesis Sqore wrote in post #1153331: Hi guys, I guess most of you usually click ignore when you see an email asking for a survey. I couldn't find the ignore button so I guess I'll drop by two cents opinion... Yes, we are doing a survey as well, but very differently :) We are

[Rails] Re: Regarding fetching the polygon data from google map and save in postgis

2014-07-21 Thread Robert Walker
Logesh m wrote in post #1152814: I have a requirement where I would need to create a geo fence and for that I have used the google map and the drawing tools and I could create a polygon using the drawing tool but I am not sure on how to save the data in postgis and I saw about rgeo but I was

[Rails] Re: Nested Iterator

2014-07-15 Thread Robert Walker
Jan Yo wrote in post #1152468: Is there a more compact way to do a nested each ? value.each do |x| x.data.each do |y| puts 'x: ' + x + ' y: ' + y end end That is can this be reduced to one or two lines? value.each { |x| x.data.each { |y| puts 'x: ' + x + ' y: ' + y } } There,

[Rails] Re: Difference between Cookies and Sessions

2014-07-07 Thread Robert Walker
Praveen BK wrote in post #1151760: Hello, Can anybody please define cookies and sessions and their differences in detail with reference to rails. What may be confusing you, that I've not seen mentioned yet, is that session identifiers are stored in cookies. Let me explain by looking at

[Rails] Re: Best scalable database

2014-07-01 Thread Robert Walker
Tudor Cojocaru wrote in post #1151044: I was wondering which is the best database in terms of scalability and also which core nosql system is the best (Document Store - Graph Database) This is like asking which car is the best. You ask 5 people and you'll get a least 4 different answers along

[Rails] Re: What is a good practice for storing additional classes

2014-06-26 Thread Robert Walker
Ronald Fischer wrote in post #1150799: My Rails application also contains classes which are independent from the Rails framework, in that they could be reused unchanged if I would, for example, created a non-web-based, command-line version of my app. Such a class could be one which implements

[Rails] Re: Execute as a service

2014-06-26 Thread Robert Walker
Josu Lazkano wrote in post #1150848: Thanks! I execute as daemon (rails server -d), and it works well. I read about Passenger, it looks really interesting. I actually use Passenger standalone for development and Passenger on the server for deployment. Works great for me. I don't, however,

[Rails] Re: Pass a ruby variable into js within Rails

2014-05-29 Thread Robert Walker
Pierre-Andre M. wrote in post #1147586: I have a variable created by some ruby in my controller that looks like this: @begpoint = row[begpoint] and I want to pass it into some js that is referenced from within my view: There are several way of doing this, but the simplest is to use HTML5

[Rails] Re: Ticketing Gem in Rails

2014-05-22 Thread Robert Walker
Ankur Kumar wrote in post #1146768: I am looking for details about any simple ticketing gem which can do following: -Track received and sent notifications between two entities -Assign status - (open/closed/resolved) etc to these notifications -Update existing ticket status with follow up

[Rails] Re: 'rails generate scaffold' is adding an 's'

2014-05-18 Thread Robert Walker
Gerald Vim wrote in post #1146378: Using Rails 4.1.1 this command: rails g scaffold Main home contact events about generates: app/controllers/mains_controller.rb Why has 's' been appended? This didn't happen with 4.1.0. Did you mean rails g controller main home contact event about?

[Rails] Re: NeedHELPASAP

2014-05-13 Thread Robert Walker
Joener Preagola wrote in post #1145843: Im not familiar on dependency injection Remove Car's explicit reference to Engine by using dependency injection. The first question to ask yourself is, Why is it important to use dependency injection in this specific scenario? After all this is Ruby,

[Rails] Re: convert json string to hash

2014-05-08 Thread Robert Walker
prabhu wrote in post #1145452: I have a string object which is basically in a json format and while trying to print it shows in console as item = { id: 4c9f83e4-f479-48d0-9f92-3fff70a8f6ba, item:

[Rails] Re: Ability for users to insert images into text area

2014-04-28 Thread Robert Walker
Colin Mr. wrote in post #1144182: So like many other beginners in Rails I'm following along to Michael Hartl's tutorial. I'm nearing the end, and I'm thinking I would like to implement the ability for users (in the social network) to upload pics along with their comments and maybe even add a

[Rails] Re: Asset Pipeline without SCSS?

2014-04-24 Thread Robert Walker
Walter Davis wrote in post #1143688: Is it possible to configure Rails through a .railsrc directive to not use SCSS, but still use the asset pipeline and Sprockets? I know that I can rename the files manually, and it does work (the files are concatenated and minified without issue), but I'd

[Rails] Re: What's going to explode.

2014-04-23 Thread Robert Walker
Walter Davis wrote in post #1143883: ...if I just bump Rails from 4.0.4 to 4.1? How dramatic a jump is this update? My guess is probably not much if you follow this guide: http://guides.rubyonrails.org/upgrading_ruby_on_rails.html#upgrading-from-rails-4-0-to-rails-4-1 -- Posted via

[Rails] Re: Social Network in RoR

2014-04-18 Thread Robert Walker
Juan Gutiérrez Ortega wrote in post #1143438: For this slide and article: https://engineering.groupon.com/2013/misc/i-tier-dismantling-the-monoliths/ In general the single app architecture is the problem, not the language/runtime/web framework. I’m sure there are ways that we could have

[Rails] Re: Push user.id to another Controller

2014-04-16 Thread Robert Walker
Alfredo Barrero wrote in post #1143117: Good morning everyone, I have a question, if anyone can answer it would be great. I'm trying to send the user.id from the users/show.html.erb to photos_controller.rb, but I'm not sure how to do it. I can send the user information to the Model but I'm

[Rails] Re: Configure restful web service in rails

2014-04-16 Thread Robert Walker
Colin Law wrote in post #1143272: On 16 April 2014 13:34, prabhu pradeep.achut...@gmail.com wrote: Hi, I am trying to create a Rest web service in my rails application. I need to configure urls for it as below. localhost:3000/book/book_id/new/param1/param2/param3/param4/... That

[Rails] Re: Database strong structure change: migrations

2014-04-16 Thread Robert Walker
Martin wrote in post #1143301: Hi there, I have some major structure change issues with an ruby on rails application, and I'd like to ask you about how i can handle that. I will make some dummy problems for you to show what i want to reach: 1. Having a Client model with first_name and

[Rails] Re: TextArea Parameter

2014-04-07 Thread Robert Walker
The documentation contains your answer: http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-text_area -- 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

[Rails] Re: TextArea Parameter

2014-04-07 Thread Robert Walker
Robert Walker wrote in post #1142180: The documentation contains your answer: http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-text_area In case you didn't get that here's an example: %= f.text_area :description, { id: my_description } % = textarea id

[Rails] Re: How to add funtionalities to images

2014-04-04 Thread Robert Walker
Elton Yau wrote in post #1142007: Hi Guys, So my friend drew an image of a form and passed it to me as a PNG file. I have placed those images on my site (as shown in attached image). How do i add functionalities to these images (more specifically, i want to make buttons and also create

[Rails] Re: beginner to ruby programming

2014-03-26 Thread Robert Walker
Jaya Ruhil wrote in post #1141029: hi every one , i am beginner to ruby, i don't know a little bit of ruby, but i have to learn it bcz i m going to work as a system admin , and for client server automation using puppet i required concept of ruby, can any body help in in directing me , towards

[Rails] Re: Dependency Management

2014-03-26 Thread Robert Walker
Matthew Riley wrote in post #1141041: I understand the code is not specific to Rails, however I am specifically interested in Rails developer’s perspective. Thanks! Perspective on what? As you demonstrate, Dependency Injection (DI) is a really simple concept, with a really simple

[Rails] Re: Why does calling .delete_all on has_many relationship nullifies foreign keys.

2014-02-19 Thread Robert Walker
unknown wrote in post #1137005: Yes I know I can set :dependant = :delete_all but what's resoning behind this default behaviour? Is it just a legacy stuff? anyone knows why the default behaviour here is to nullify keys? Actually, the Rails documentation explains this rather clearly, so the

[Rails] Re: Rails where clause help

2014-02-18 Thread Robert Walker
Arup Rakshit wrote in post #1137044: Hi, I found one answer from - http://stackoverflow.com/a/20198450/2767755 @users = User.where(name: [@request.requester, @request.regional_sales_mgr]).all Here @users will be having all those users, whose names are either `@request.requester` or

[Rails] Re: Rails where clause help

2014-02-18 Thread Robert Walker
Robert Walker wrote in post #1137051: @users.where({ name: @request.requester, name: @request.regional_sales_mgr }).all Just note that this would never return any results since name can only have one value at a time. Except in the case where @request.requester == @request.regional_sales_mgr

[Rails] Re: I failed in C language , what about ruby on rails?

2014-02-18 Thread Robert Walker
haytham agbariah wrote in post #1137023: Hello , I tried to learn C language , I failed twice in the C course(because of Binary trees) .. I believe that ruby on rails is the future , Should I give up on programming ? or there is no connection between Failing in C and Succession in ruby on

[Rails] Re: Help Installing rbenv?

2014-02-12 Thread Robert Walker
John Weiss wrote in post #1136424: http://s19.postimg.org/ss009x84z/term.png Did you also install ruby-build? rbenv does not come with the rbenv install command by default. rbenv itself is just a Ruby environment manager, and not an Ruby compile and install manage. That's what the ruby-build

[Rails] Re: Can two Rails versions use one database?

2014-02-05 Thread Robert Walker
Russ Dast wrote in post #1135683: Thanks Walter and Jim for your feedback. The Railsconf talk was indeed informative, although we are still leaning against an upgrade path and are more likely to choose a rewrite-based approach. Jim, I hadn't thought about the flash, so thanks for pointing

[Rails] Re: Ruby on Rails based Web IDE

2014-01-27 Thread Robert Walker
Oleksii Zaitsev wrote in post #1134538: I am going to create Ruby on Rails application that works like minimal web based IDE. I want to implement several components: 1. Web terminal to interact with local unix machine. 2. Tree view file navigation. 3. Text editor with syntax

[Rails] Re: Rails 4 and Ruby 2 on Windows 8.1

2014-01-09 Thread Robert Walker
Eastside Developer wrote in post #1132713: Has anyone been able to do this successfully? and what's the best equivalent to RVM in the Windows world? Why would you want to? Throw a Linux VM on there and go to town with Rails. P.S. I know there are some extreme circumstances where this is

[Rails] Re: Working with JavaScript

2014-01-06 Thread Robert Walker
James Turley wrote in post #1132300: 2) Use JQuery or a similar library (JQuery is in your standard Rails project gemfile) to add a listener. It would be something like this: As you might have guessed option 2) is the RIGHT option (as opposed to the, It may be ugly but it works! option). --

[Rails] Re: ActiveRecord simple question about date

2013-11-19 Thread Robert Walker
Colin Law wrote in post #1127964: On 19 November 2013 18:36, rusik rus...@gmail.com wrote: yes, it is string. I find decision , i am using date without zero's like this: Just to convince us show us the users table entry from db/schema.rb. Just a thought, but if the birthday is truly being

[Rails] Re: has_many question

2013-11-11 Thread Robert Walker
Dave Castellano wrote in post #1126985: Hi all, I need some guidance please. I have several tables related by has_many and I would like to find the distant children. Tables: Subjects Books Chapters Sections Subsections Minisections They are all related heirarchichally, so book for

[Rails] Re: Is it possible with Rails to interact with SVN Server and/or the server's shell?

2013-11-06 Thread Robert Walker
Monserrat Foster wrote in post #1126580: Hello! I'm fairly new to Ruby and Rails, and currently I don't have any knowledge on interacting with the server's shell or a SVN server, but now I have to develop an app where admins allow/restrict access to files and folders from the app and some

[Rails] Re: Is it possible with Rails to interact with SVN Server and/or the server's shell?

2013-11-06 Thread Robert Walker
Robert Walker wrote in post #1126590: Issuing system commands is as simple as: system svn command My apologies, but you need to quote the command part: system 'svn command' -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google

[Rails] Re: Is it possible with Rails to interact with SVN Server and/or the server's shell?

2013-11-06 Thread Robert Walker
...@example.com out = `git log --no-color --author=#{git_user} --pretty=full` puts out - $ ./main.rb commit 58359794f4443985279cdd1627cdf944fd140d24 (HEAD, master) Author: John Doe j...@example.com Commit: Robert Walker rob...@example.com Changing test file. M test.txt

[Rails] Re: Turn OFF Daglight saving time in Rails app

2013-11-04 Thread Robert Walker
Dinesh Atoliya wrote in post #1126155: Is there any way that we can turn off DayLight saving in rails app? Rails uses tzinfo gem for converting time in zones but it does not handle it correctly for some timezone. Is there any way we can turn OFF DayLight saving completely ? First I would

[Rails] Re: Use of FCKEDITOR as normal text area

2013-10-30 Thread Robert Walker
keerthi priya wrote in post #1126074: Hi all I am trying to use Fckeditor as text area to send mails.here is my code % remote_form_for :send_sms, :before = Element.show('loader'), :success = Element.hide('loader') do |sms| % div id=news_content_text_field_bg %=

[Rails] Re: Is it a good idea to use timestamps

2013-10-22 Thread Robert Walker
Matt Jones wrote in post #1125222: On Monday, 21 October 2013 13:24:47 UTC-4, desbest wrote: Depends on your database - in MySQL the TIMESTAMP column type is limited to 2038, but in others (Postgres, for one) this isn't the case. If you declare your columns as :datetime in Rails migrations

[Rails] Re: Is it a good idea to use timestamps

2013-10-21 Thread Robert Walker
desbest wrote in post #1125087: Timestamps are a number that counts the number of seconds from the epoch date 1/1/1970. I read somewhere on the internethttp://en.wikipedia.org/wiki/Year_2038_problem, that timestamps will expire in the year 2038. This is why I always use *-mm-dd* and

[Rails] Re: What license do you use for your Ruby gems?

2013-10-12 Thread Robert Walker
Jason Hsu, Rubyist wrote in post #1124349: On Friday, October 11, 2013 7:21:57 PM UTC-5, Ruby-Forum.com User wrote: That's really up to you AFAIK. I typically use the MIT license on my stuff, but choosing a license can be a fairly personal choice. It depends on what you're trying to protect,

[Rails] Re: What if you don't want your model to be from Active Record?

2013-10-12 Thread Robert Walker
Peter wrote in post #1124413: By wrap together, I meant I would write a single function for all the functions I would use from the AWS API. So, I should put this in the models directory, right? I want the controller to remain a controller with respect to rails-isms. class MyAWSAPI def

[Rails] Re: Access tocken

2013-10-11 Thread Robert Walker
Daynthan Kabilan wrote in post #1124237: hi friends, i am using omni contacts gem for import friends. how to get access token on facebook login using omni-contacts gem Get if from Facebook: https://developers.facebook.com/docs/facebook-login/access-tokens/ -- Posted via

[Rails] Re: What license do you use for your Ruby gems?

2013-10-11 Thread Robert Walker
Jason Hsu, Rubyist wrote in post #1124297: I have created two Ruby gems (dvi_scrape and bsf_scrape), and I'm planning on creating a few more. What license should I be using for my Ruby gems? I'm creating these gems on my own and not on behalf of any particular organization. That's really

[Rails] Re: Consuming a web service created with Rails, ETL vs Rest?

2013-10-09 Thread Robert Walker
Monserrat Foster wrote in post #1124014: I don't want any code. The gem suggested to me to use is Activewarehouse-ETL but as far as I know, this gem only allows to manip databases and the administrator for the redmine app clearly said no databases conections because 'I might damage something'

[Rails] Re: Consuming a web service created with Rails, ETL vs Rest?

2013-10-08 Thread Robert Walker
Monserrat Foster wrote in post #1123885: It has do with rails because I'd be using an already existing rails app and probably another app with a few gems to connect to the already defined web service (IMO) http://www.redmine.org/projects/redmine/wiki/Rest_api That explains the Redmine REST

[Rails] Re: Omni_auth with Facebook

2013-10-07 Thread Robert Walker
Rosy Catz wrote in post #1123747: Hi, I've implemented the sample app with omni_auth('0.2.6'). I'm using rails 2.3.11 with ruby 1.8.7. I tried to connect with Facebook but getting oauth error. I tested it with twitter google plus account. Both are working fine but the FB connects is not

[Rails] Re: Differentiate Client browser http call

2013-09-26 Thread Robert Walker
Avi wrote in post #1122484: Hello All, How can I differentiate the call between client ios app browser call? session_controller - create method is being used by both client rails web application. I want to restrict for web application to use create method. how can I achieve this?

[Rails] Re: How to communicate a web app with destkop app?

2013-09-25 Thread Robert Walker
Ricardo do Valle wrote in post #1122365: @Colin the rails server is running in a VPS with nginx and unicorn. @Fernando, thank you very much, but it is not alternative for this project, i will study the chrome devs API for a future and another project, have you used already? I am looking

[Rails] Re: Should sanitize return an empty string for non-strings?

2013-09-12 Thread Robert Walker
Hassan Schroeder wrote in post #1121316: On Wed, Sep 11, 2013 at 3:36 PM, Paul E. G. Lynch plynch...@gmail.com wrote: If, in your view, you are expecting params[:name] to be a string, but actually rails has parsed it into {.=1234} (or something more malicious) Params are strings by

[Rails] Re: Should sanitize return an empty string for non-strings?

2013-09-11 Thread Robert Walker
Paul Lynch wrote in post #1121214: If, in your view, you are expecting params[:name] to be a string, but actually rails has parsed it into {.=1234} (or something more malicious), then currently %= sanitize(params[:name]) % blows up because the hash does not respond the expected methods from

[Rails] Re: Algorithm execution with Rails

2013-09-10 Thread Robert Walker
Gab dlm wrote in post #1121158: Hello, I have a doubt , when I develop an app that run a encryption algorithm , this algorithm run first on the client computer and the send the data to server , or is executed directly on server , enabling interception of the plain text? I'm sorry, I don't

[Rails] Re: Confusion with method call without `.` operator

2013-09-06 Thread Robert Walker
Love U Ruby wrote in post #1120864: I am confused on the second call :- class Foo def (param) hi end end foo = Foo.new foo.(1) # = hi foo 1 # = hi # I didn't use `.` method,then how method `` has been called? I would image that it works the same as it does for the +, -, *,

[Rails] Re: What is this error

2013-08-19 Thread Robert Walker
keerthi priya wrote in post #1119115: Hi all, I am getting this bellow error No method error undefined method `each' for nil:NilClass The error is what it says it is. You are sending the message 'each to a nil object reference. Look back through the stack trace until you get to the first

[Rails] Re: Line break retention in simple_format

2013-08-17 Thread Robert Walker
simpleton wrote in post #1118613: There are quite a lot of line break issues with Rails on StackOverflow and the web in general. A lot of solutions are ugly and a lot modify simple_format so I've created a patch that I'd like to hear thoughts on before submitting a PR. There are a lot of

[Rails] Re: What's the proper way to delete all associated children in one SQL statement, with AR 4.0 ?

2013-08-08 Thread Robert Walker
Savater Sebastien wrote in post #1118021: class Parent ActiveRecord::Base has_many :items end class Item ActiveRecord::Base belongs_to :parent end I need to delete all items associated to one parent, without callback. I don't need to call #destroy, but only executing the

[Rails] Re: other css design framework like bootstrap

2013-08-08 Thread Robert Walker
Dave Aronson wrote in post #1118150: On Thu, Aug 8, 2013 at 4:00 PM, mukul saharia mukul.saha...@gmail.com wrote: i am using twitter bootstrap css designing framwork.. is there other framework like bootstrap.. please suggest. There are plenty. Off the top of my head, though I might be

[Rails] Re: Rails 4 Turbolinks make js not working as expected

2013-08-07 Thread Robert Walker
William Herry wrote in post #1117842: details is here: http://stackoverflow.com/questions/18068951/rails-4-turbolinks-make-js-not-working-correct in short, Turbolinks make js form submit multiple times Are you sure you have complied to the compatibility requirements of turbolinks?

[Rails] Re: File transfer via SOAP

2013-08-05 Thread Robert Walker
Евгений Куртов m...@lessless.pp.ua wrote in post #1117771: Hello! Can't find any related data on the subject: how to receive a file via SOAP. If anyone have accomplished such a task I'll be very greatful for any help and info. Thanks. SOAP is actually not a great transport layer for large

[Rails] Re: Rails multistep form with ajax

2013-08-02 Thread Robert Walker
Seth Portman wrote in post #1117487: I am following Railscasts #217 and I have been able to make everything work using html protocol the only issue is that I need it to use ajax protocol instead. My question and code is very similar to stackoverflow question Multistep forms in Rails using

[Rails] Re: Lat/Lng boudaries for each reverse geocoded address for google

2013-07-31 Thread Robert Walker
Ajit Teli wrote in post #1117253: Hi, I would like to get the lat/long boundaries for each reverse Geo-coded address. For example, Lat: 14.32826, Lng: 77.643127 pair gives reverse Geo-coded address as Kanyakumari Road, Andhra Pradesh 515101, India. There will be list of other lat/long

[Rails] Protecting user privacy with CanCan

2013-07-31 Thread Robert Walker
Hi all. I'm using CanCan for my app authorization and need to know how to protect privacy between users. Say I have the following three users: Alice Bob Charlie Alice is an admin and should be able manage everything. Bob and Charlie are regular users and should be prevented from getting the

[Rails] Re: Concerns vs libraries

2013-07-26 Thread Robert Walker
unknown wrote in post #1116591: I think I might be a little confused but I cant really understand exactly when to separate code into a concern, and when to separate it into a library. 1. What's the exact difference? Concerns is a technique used to either share some behavior between models

[Rails] Re: How to move rails application from one server to another server

2013-07-25 Thread Robert Walker
kishan kumar katamala wrote in post #1116674: Hi all, I am newbie to ruby on rails, i want to move rail application from one server to another servers. can you please help me. You need to investigate a proper application deployment strategy. You should not have to move an app from one

[Rails] Re: Rails migration generation with options or defaults

2013-07-25 Thread Robert Walker
Kirankumar Skk wrote in post #1116632: In Rails we have command to add migration that specifies the table name column name. For example : $ rails generate migration AddPartNumberToProducts part_number:string *Problem: How to specify the options (example :after = :descritpion) on command

[Rails] Re: Re: How to create first user for sign in using devise

2013-07-23 Thread Robert Walker
Emil S. wrote in post #1116325: The user actually uses the email ID and can remember it . I can never remember my usernames , usually. Also forgot password becomes easy with email ID's . But then again, to each, his own. Yes forgot password is easy that way. It's also easy for the hacker who

[Rails] Re: How to create first user for sign in using devise

2013-07-22 Thread Robert Walker
Emil S. wrote in post #1116233: I use email for login , so I do this in the console/database seed file : User.create(email: 't...@test.com', password: 'password123', password_confirmation: 'password123') Then I log in with the t...@test.com and password123 Personally speaking, I generally

[Rails] Re: How to create Categories in Rails

2013-07-20 Thread Robert Walker
Giannakis P. wrote in post #1116088: Hey Ruby on Rails Community i'm trying to Add Categories to my Rails app, but don't quite know how to do this. I have many Pins(Images) and want the user to be able to assign a category on those Pins. ASSIGN not create, edit, or delete a Category, just

[Rails] Re: Reusing functional tests with rails 4

2013-07-19 Thread Robert Walker
J. mp wrote in post #1115983: I want to run both test for each of the role (Merchant or FrontStore) but not repeating the test code. My question is, how best design the test so they are reusable in this case? IMHO you shouldn't. Test code should be DAMP not DRY:

[Rails] Re: Rails 4 belongs_to: record association doesn't work

2013-07-19 Thread Robert Walker
Colin Law wrote in post #1116001: On 19 July 2013 14:59, David pie...@workhub.com wrote: Yes exactly. It's specific to the word 'record'. It works when I change it to :foo or :b (or anything else). Are there any reserved words for association names? It would appear that the answer to that

[Rails] Re: installing rvm in home directory or system-wide?

2013-07-17 Thread Robert Walker
Emil S. wrote in post #1115716: I hope you have gone through this : https://rvm.io/rvm/install . System wide RVM will let you use the same installation for all users on the system. But I've seen many junior devs screw up their dev environment by trying a system wide RVM installation but didn't

[Rails] Re: Hide URL from view

2013-07-11 Thread Robert Walker
hara acharya wrote in post #1115165: Hi, I have a button as below. %= button_to('On', @userdetail.url + '?value=1', :method = post, :remote = true, :disable_with = 'loading...') % Here @userdetail.url is a external URL, and I don't want to show the url in view source for users. What, are

[Rails] Re: Face Problem to create a new app

2013-07-10 Thread Robert Walker
Tushar Patil wrote in post #1115001: I create a new app = rails new demo I have a rails3 ruby 1.9.1 After that i try to install bundle, but it will give a error I thought Ruby 1.9.1 was completely broken when trying to run Rails. Try Ruby 1.9.3. Bundler could not find compatible versions

[Rails] Re: Ruby on Rails sessions

2013-07-05 Thread Robert Walker
unknown wrote in post #1114514: I'm learning RoR and i would like to know more about the sessions in RoR Can anyone give me a good example for a session in a web application? or good pages for learning? (not: http://ruby.railstutorial.org/ruby-on-rails-tutorial-book :P) There's really not

[Rails] Re: how to use single login page for users in four models

2013-07-05 Thread Robert Walker
ram kris wrote in post #1114502: how to use single login page for users in four models You have not given enough detail in your question to know what you're asking. Are you saying that you have four different types of users? If so then why do you have four models instead of doing role based

[Rails] Re: URL id not part of the params objects after post

2013-07-05 Thread Robert Walker
Rodrigo Lueneberg wrote in post #1114532: %= form_tag('/users/delete') do % %= submit_tag 'Click here to delete this user' % % end % When the form is posted, params[:id] does not exist, why? Because you're using for_tag instead of form_for: %= form_for :user, :method = :delete do |f| %

[Rails] Re: URL id not part of the params objects after post

2013-07-05 Thread Robert Walker
Rodrigo Lueneberg wrote in post #1114538: Thanks Robert, You just gave some insight. You're right I should use form_for, but I just want to point that the user id is indeed passed in the URL above and I can reference a Model object even when not using a form_for. But I don't understand why it

[Rails] Re: No ActionView module in Rails Edge API. Did they remove it from the framework?

2013-07-05 Thread Robert Walker
Wins Lin wrote in post #1114551: I found that there is no ActionView module in http://edgeapi.rubyonrails.org/ Did they remove it from the framework? I'm not sure what's up there. Maybe they are reworking that section in the edge version of the API docs. ActionView is still listed in the

[Rails] Re: Devise auth based on ssl keys

2013-07-03 Thread Robert Walker
lobster lobster wrote in post #1114299: I already have a rails 3.1.2 and ruby 1.9.3 vast app with an auth based on devise. Now I want to add to the my app a ssl key based auth. As web-server it uses thin and nginx as proxy. I have made only ssl on the nginx at 443 and only for some app pathes

[Rails] Re: Reducing downtime

2013-07-03 Thread Robert Walker
Peter Hickman wrote in post #1114323: To reduce the time we lose when we restore a backup we could of course just take more frequent backups. But this would start to become a performance issue, not to mention pulling the backups off the server will start to eat into our bandwidth. Any

[Rails] Re: rails 4 openid problem

2013-07-02 Thread Robert Walker
Ilya Ishmatov wrote in post #1114007: Hi. After update in Gemfile rails gem from 3.2.6 to 4.0.0. Registration by openid not working. Log from console: I, [2013-06-30T17:56:33.632030 #23279] INFO -- OpenID: Error attempting to use stored discovery information: OpenID::TypeURIMismatch

[Rails] Re: No more info about dynamic_form in rails guides?

2013-06-28 Thread Robert Walker
Wins Lin wrote in post #1113811: I remember for sure there was a explanation with screenshots about dynamic_form in Rails Guides. Now I cannot find it, neither in Edge nor in standard guide. Have they removed it? Why? Where may I find the info again? https://github.com/joelmoss/dynamic_form

[Rails] Re: Hash_Tag Client side Validation

2013-06-28 Thread Robert Walker
Manoj M. wrote in post #1113802: Hi anybody help me to find suitable validation way for Hash_Tag, My need is user should only type hash_tag like below format. a) #sports b) #sports,#news There's not enough information here to really know how to help you, but the solution will almost

[Rails] Re: Ruby On Rails integrate with Object C

2013-06-24 Thread Robert Walker
haxuan lac wrote in post #1113439: I want to build Application with ROR and this App can integrate with Object same as Client But I don't know how to build it Please give me some advice for it. Thanks. You might want to try this: https://github.com/RestKit/RestKit -- Posted via

[Rails] Re: Installing gems to user directory - Configurations - How to ?

2013-06-24 Thread Robert Walker
Boopathi Rajaa wrote in post #1113443: I compiled Ruby from source, and installed it to /opt/ruby/ . The purpose is to have two versions of Ruby 1.9 and Ruby 1.8 ... Certain users can use 1.9 After creating a rails app (rails new app) , When a script performs `bundle install`, the gems are

[Rails] Re: [HELP ] Call java code / method from Ruby programming

2013-06-21 Thread Robert Walker
Colin Law wrote in post #1113075: On 21 June 2013 04:04, Muthu Selvan pearl.sel...@gmail.com wrote: I have written java code ( This java code will not return any thing but it will do action ) which is required call from ruby , please let me what is best way to achieve this ? You can use

[Rails] Re: [HELP] - Ruby Drag and Drop script on screen element in Mac OS

2013-06-20 Thread Robert Walker
Muthu Selvan wrote in post #1113021: On Thursday, 20 June 2013 10:07:21 UTC-7, Walter Lee Davis wrote: You can drag and drop a desktop element into a browser, and after setting up the appropriate JavaScript in that browser, you can detect the drop on a particular element and do something with

[Rails] Re: Hosting ruby application of IIS 7

2013-06-20 Thread Robert Walker
Sasmit Sawant wrote in post #1113034: I am new to ruby programming. I have just started creating a simple ruby application using ruby on rails. I have installed ruby 1.8.7-p371 and DevKit successfully. If you're just getting started with Ruby on Rails then you may want to seriously consider

  1   2   3   4   5   6   7   8   9   10   >