Re: [Rails] cannot upload more than 8-9KB in production

2019-06-13 Thread Paul Makepeace
One thing to check in these situations is whether there's an MTU (https://en.wikipedia.org/wiki/Maximum_transmission_unit) mismatch with the don't-fragment bit set. This is lower level than your app stack but often just mentioning those words can be enough to get other folks to fix the issue :-)

Re: [Rails] [job] Looking for Rails freelance developers

2018-06-19 Thread Paul McCubbins
Are you in the US? On Mon, Jun 18, 2018, 23:44 Karthikeyan A K <77mi...@gmail.com> wrote: > Hello All, > > One of the startups I am coding for is expanding. We are looking for > freelance Ruby on Rails backend developers who can put in at lease 25 hours > a week. The work is completely

[Rails] Re: How to handle the "\b" (the backspace character) in your Rails application?

2018-06-04 Thread Paul McMahon
On Monday, June 4, 2018 at 7:30:31 PM UTC+9, fugee ohu wrote: > > You don't want to accomodate them in allowing them to input the special > character do you? > There's no reason I can see of in our app (or almost any Rails app) you'd want to allow the "\b" character as user input. -- You

[Rails] How to handle the "\b" (the backspace character) in your Rails application?

2018-06-04 Thread Paul McMahon
Somehow, users sometimes enter "\b" (the backspace character) into our web forms.For the sake of example, say they enter in "Foo\bbar" into a form. This then gets saved to the database as is "Foo\bbar". When I later include this in my html, it gets added as is (so my html contains "Foo\bbar").

[Rails] Rails 5.2: GCP deployment fails after starting to use the new encrypted credentials feature

2018-05-28 Thread Paul Badarau
Hello, I'm facing quite a strange issue with GCP (Google Cloud Platform) deployments. I've recently updating my Ruby on Rails application to 5.2 (was 5.1.4 previously) and I started using the the encrypted credentials feature (which I believe is amazing, to be honest), but it looks like GCP is

Re: [Rails] Rails 4, Foundation 6, Angular 1.5.0

2016-04-09 Thread paul h
Hi Hassan, Thanks for the tips below, they helped. Finally fixed it by instantiating the angular app in application.js rather than in it's own app.js.coffee file and letting sprockets handle it. Thanks for your time. Paul On Friday, April 8, 2016 at 4:32:07 PM UTC+1, Hassan Schroeder wrote

[Rails] Rails 4, Foundation 6, Angular 1.5.0

2016-04-08 Thread paul h
;, ["$scope","$log", ($scope, $log) -> ] Any help is greatly appreciated, and if you need anything more from me, let me know and I'll be happy to supply. Thanks Paul -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk&qu

Re: [Rails] Ruby Developer

2016-01-29 Thread Paul Nicholas McCubbins
gt; > > > Sandeep Jain > > Software People Inc. > > <mailto:sandeep.j...@softwarepeople.us> > sandeep.j...@softwarepeople.us > > Ph: 631-863-0299, 631-410-4741, 631-921-2111 C Fax: 631-574-3122 > > Twitter: Software People @spincjobs > &g

[Rails] Web Worker javascript files

2016-01-26 Thread Paul
Using web workers in Rails seems a little awkward. I was wondering if anyone had a nice work flow. 1) Since they are loaded directly, they can't be in the asset pipeline, so I created a folder under public: public/web_workers/ Disadvantages: - The web worker code isn't minimized. - The web

[Rails] Re: Weird issue with actionmailer on rails 4.2.4

2015-09-07 Thread Patrick Paul-Hus
Nevermind... I was using the <%= message %> variable instead of <%= @message %> O_o On Monday, September 7, 2015 at 6:42:37 PM UTC-4, Patrick Paul-Hus wrote: > > Hi, I have a pretty standard and simple mailer model with its own html and > text view. When I send it, the

[Rails] Weird issue with actionmailer on rails 4.2.4

2015-09-07 Thread Patrick Paul-Hus
Hi, I have a pretty standard and simple mailer model with its own html and text view. When I send it, the content of the email is actually sorta headers and the actual message isn’t there. The mailer looks like this: class TestMailer < ApplicationMailer default from: "nore...@foobar.com"

[Rails] Re: Rails passing params in link_to how to make it secure

2015-08-11 Thread paul h
Hi Nilay, Ruby and Rails are changing all the time, so it's always useful to post which versions you are using, if I missed it in your post I apologise. On Tuesday, August 11, 2015 at 7:03:24 PM UTC+1, nilay singh wrote: Thanks for reply paul . If you can suggest me how should I use

[Rails] Re: Rails passing params in link_to how to make it secure

2015-08-11 Thread paul h
be to add some Javascript that removes the link from the page after the first click before the request is sent to the browser, and maybe display an indictor/spinner that informs the user that the click is currently being handled. Regards Paul -- You received this message because you are subscribed

Re: [Rails] Re: Good queue manager?

2015-07-20 Thread Paul Makepeace
https://github.com/ejschmitt/delayed_job_web On Mon, Jul 20, 2015 at 1:04 PM, Jeff Pickhardt pickha...@gmail.com wrote: Thanks. What I'm looking for is an admin dashboard to manage your queues, see how many jobs are in it, see what's failing, etc. Do you know of anything like that? -- Sent

Re: [Rails] Re: i'm getting this error with rails cannot load such file -- bcrypt

2015-07-20 Thread Paul Makepeace
https://gist.github.com/ On Mon, Jul 20, 2015 at 2:31 PM, Elizabeth McGurty emcgur...@gmail.com wrote: This solution is very interesting to me. I was not aware that I could post a link to GitHub and get help. I think that it would be hugely useful to many folks here, if you could elaborate.

Re: [Rails] application playback module

2015-07-15 Thread Paul Makepeace
there's a somewhat experimental pg_audit extension that uses triggers to maintain a change log.​ Oracle has AUDIT, etc.. Paul -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ https://www.linkedin.com/in/scottribe/ (303) 722-0567 voice -- You received this message

Re: [Rails] Multiple delayed jobs using in a ruby class

2015-06-17 Thread Paul Makepeace
to orchestrate some sequence during the original job scheduling. On Tue, Jun 16, 2015 at 10:28 PM, amtest vgrkrish...@gmail.com wrote: Hi, thanks for the response paul, actually i am trying to do export the csv, so that will take bit time to getting data and push to s3 that's why i put the delay, so

Re: [Rails] Multiple delayed jobs using in a ruby class

2015-06-16 Thread Paul Makepeace
If you want to sequence the jobs why not just make it one job where the second job is just a method call? One important purpose of asynchronous jobs like this is to get them out of the way of a main loop. By making it one job you've done that so there's no obvious (so far) pressure to punt the

Re: [Rails] Re: Best IDEs for Ruby on Rails

2015-06-16 Thread Paul Makepeace
and well implemented features like a UI to select which files to check in, easy to review diffs, refactoring, completion, etc. Totally worth the small outlay considering the time it saves me. https://www.jetbrains.com/ruby/ Paul, vi power user since 1992 (later vim) On Mon, Feb 24, 2014 at 11:12 AM

Re: [Rails] Sort hash in model

2015-06-01 Thread Paul Makepeace
On Mon, Jun 1, 2015 at 7:03 AM, Gm javapla...@gmail.com wrote: Thank you all. Paul, I end up doing this: sorted_by_second_value = Hash[hash.sort_by { |_, v| v[1] }] sorted_by_second_value.to_a.reverse.to_h ​Here you're converting an array (​hash.sort_by { |_, v| v[1] }) to a hash ( Hash

Re: [Rails] Sort hash in model

2015-05-29 Thread Paul Makepeace
. sorted_by_second_value ​.map { |_, v| v[1] } = [74, 75, 84, 99, 100] ​Paul​ ​ On Fri, May 29, 2015 at 6:24 AM, Gm javapla...@gmail.com wrote: Hi, I have this hash: hash = { 4049=[4133, 100], 5814=[4075, 84], 382543=[4064, 74], 382544=[4065, 99], 382545=[4066, 75] } I need to sort (DESC

Re: [Rails] Getting Approved by Adsense

2015-05-24 Thread Paul Makepeace
The crawler has to be able to see it. Publish more content perhaps based on user content, eg tag clouds or have users' published content be public. Doesn't sound like your site is a match for AdSense frankly though. On Sunday, May 24, 2015, Anthony Galli li...@ruby-forum.com wrote: First off,

Re: [Rails] Create letters with ROR display on cmd

2015-05-08 Thread Paul Makepeace
/banner/chset.c contains encoding of the letters and then http://www.opensource.apple.com/source/text_cmds/text_cmds-9/banner/banner.c uses it. It goes further by correctly printing drop characters like j, p, q, etc. HTH, Paul On Thu, May 7, 2015 at 5:29 PM, Miles Morales nncy.vall...@gmail.com

Re: [Rails] Unable Send Email through SMTP

2015-04-23 Thread Paul Makepeace
Whom are you sending email to? Because which service you connect to, and how, affects how Gmail restricts the recipients. Make sure you're lined up fully with, https://support.google.com/a/answer/176600?hl=en Specifically you may need to be using, smtp-relay.gmail.com HTH, Paul On Thu, Apr 23

[Rails] Re: Sending zipped files as attachments

2015-02-12 Thread Paul Edwards
I know this is an old thread, but did you ever find a solution? I'm having an identical issue with Rails sending a zip file! -- 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

[Rails] Logging in to WordPress from Rails

2014-10-10 Thread Paul
I have a rails app (v4.1.6 at the moment) that uses Devise. I have configured a subfolder to serve up WordPress for a blog. That is: http://my_app.com -- rails app http://my_app.com/blog -- wordpress That is all working great, but I also want the user to be logged in to wordpress when logged

[Rails] Gem: Bootstrap-Material-Design Released

2014-10-03 Thread Paul King
Now you can find it at Github https://github.com/Aufree/bootstrap-material-design. I have a bit of work to do before it will be done, but if you'd like to contribute feel free to fork it. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group.

Re: [Rails] Duplicating strange bot error

2014-07-20 Thread Paul
to do that with curl. I'll post if my experiments look useful, but if anyone has already figured it out, please post. On Sun, Jul 20, 2014 at 10:43 AM, Hassan Schroeder hassan.schroe...@gmail.com wrote: On Sat, Jul 19, 2014 at 7:11 PM, Paul p...@nines.org wrote: I'm getting a 500 error on my

[Rails] Duplicating strange bot error

2014-07-19 Thread Paul
I'm getting a 500 error on my website that obviously comes from a bot. I'd like to duplicate that error so that I can try to suppress the email message that gets sent to me. The error contains: (ArgumentError) invalid %-encoding It's in a show action, so it's a GET command. I can see the URL

[Rails] Rails engines - best practice/architecture query

2014-05-02 Thread Paul Olivers
belong to the core app, or would I have ANOTHER engine with the models in? thanks, Paul. -- 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 rubyonrails-talk

[Rails] sidekiq job status back to browser

2014-03-23 Thread Ken Paul
Hi, There was a post in this forum saying it is possible to stream the way of transition the sidekiq job status back to browser with rails 4, but it didn't include too much details. Does anyone know anything about this new technology? What is it and how to let browser know a job is completed. I

[Rails] Re: sidekiq job status back to browser

2014-03-23 Thread Ken Paul
Hassan Schroeder wrote in post #1140691: Is 'ActionController::Live' what you're referring to? Yes, this is the module/class that pushes notifications back to client browser side using the server-sent event. That's COOL! -- Posted via http://www.ruby-forum.com/. -- You received this

Re: [Rails] OT: buying a Mac computer

2014-02-27 Thread Paul Makepeace
the development environment - this is the massively personal choice that is likely the big decision maker for most. There's no point justifying what each person likes any more than their taste in broccoli but ultimately if you really like OS X or Linux, well... :) Paul On Tue, Feb 25, 2014 at 2:00 PM

Re: [Rails] Best practice to use AngularJS with Rails 4

2014-02-07 Thread Paul
Unfortunately, it's not open source. Sorry. On Fri, Feb 7, 2014 at 1:30 AM, tamouse pontiki tamouse.li...@gmail.comwrote: On Tue, Feb 4, 2014 at 10:50 PM, Paul p...@nines.org wrote: Don't know about best practice, but what I did was create a single page app, with an appcache manifest

[Rails] Re: Automated Form Filling [Off Topic(ish)]

2014-02-06 Thread paul h
On Wednesday, February 5, 2014 4:46:54 PM UTC, Frederick Cheung wrote: On Wednesday, February 5, 2014 2:26:45 PM UTC, paul h wrote: Hi All, I need to post data from my rails app to an external web form I do not have any control over. There is no public API, so I was wondering if anyone

[Rails] Automated Form Filling [Off Topic(ish)]

2014-02-05 Thread paul h
to tagging a cuke scenario with a @javascript tag in order to automate page interaction. I will start looking into Selenium this weekend, but was wondering if anyone had any ideas that might point me in one or other direction. Thanks Paul Hollyer -- You received this message because you

Re: [Rails] Best practice to use AngularJS with Rails 4

2014-02-04 Thread Paul
Don't know about best practice, but what I did was create a single page app, with an appcache manifest. Since the browser URL changes, you still have to create a bunch of entries in your routes file, but they all point to the same controller method. Then all the user data is stored in LocalStorage

[Rails] Rails console Association error

2014-01-27 Thread Paul Kioko
I have tried to use the rails console to run the following: Teamplayer.includes(:live_player) It tells me: Association named 'live_player' was not found on Teamplayer; perhaps you misspelled it? so the tables are named live_players and teamplayers respectively. There is also another table

Re: [Rails] Adding instant messaging to a rails application

2013-12-09 Thread Paul
I'm sorry you didn't get any responses to this. I've been trying to get it working, too. If you make any progress, please let us know on this list. -- For my purposes, it was sufficient to create a once-a-minute polling loop to ping the server, but I'd much rather figure out how to do the server

Re: [Rails] API Only Rails Application

2013-10-05 Thread Paul
I don't know for sure, but I used devise, but then I ended up cutting out most of the functionality, so it probably would have been easier to go a different route. I don't use any of the devise views except for the link that one clicks from their email when they forget their password. The login

[Rails] Production quality Rails 4 chat demo?

2013-09-26 Thread Paul
Hi Everyone, I'm trying to use Rails 4's ActionController::Live functionality to do a chat-like interface in my app. I've found a number of blog posts, all of which seem to be based on Aaron Patterson's original one here: http://tenderlovemaking.com/2012/07/30/is-it-live.html Has anyone here

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

2013-09-12 Thread Paul Lynch
to make the parameter safe. On Wed, Sep 11, 2013 at 7:21 PM, Robert Walker li...@ruby-forum.com wrote: 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

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

2013-09-12 Thread Paul Lynch
ISE here. Silently swallowing ArgumentError or NoMethodError is a terrible idea, since it also can obscure real bugs. If you really want that behavior, try: %= sanitize(params[:name]) rescue '' % --Matt Jones On Thursday, 12 September 2013 09:26:18 UTC-5, Paul E. G. Lynch wrote

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

2013-09-11 Thread Paul E. G. Lynch
in code to check that the params values I am sanitizing are strings, but it seems like it would be better for sanitize to handle that, and perhaps just return the empty string if the processing of the input raises an exception. --Paul -- You received this message because you are subscribed

[Rails] Re: Problem with assets and path

2013-07-16 Thread Paul Bergstrom
One more thing. The host has a www directory. When using rails the app is in another directory with a .htaccess and a RewriteRule in www pointing to the rails app and dispatch.fcgi. Could it be a problem with that? -- Posted via http://www.ruby-forum.com/. -- You received this message

[Rails] Re: Problem with assets and path

2013-07-16 Thread Paul Bergstrom
Additional question. Should I run RAILS_ENV=production bundle exec rake assets:precompile on the server? Must I do that each time I add a new asset, e g image or new css file? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google

[Rails] Re: Problem with assets and path

2013-07-16 Thread Paul Bergstrom
Walter Davis wrote in post #1115639: I find that I do have to do this after every change at the server. I don't need to include the environment, it seems to be a default somehow. rake assets:precompile is enough (I do run rvm on the server, so the bundle exec part is inferred as well).

[Rails] Re: Problem with assets and path

2013-07-16 Thread Paul Bergstrom
Not sure the solution is in here but https://www.altamiracorp.com/blog/employee-posts/rails-3 Didn't work for me. I really need a solution to the path problem :-) -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Problem with assets and path

2013-07-15 Thread Paul Bergstrom
My page doesn't load css and images in production mode. For css I get a path like /appname/assets/ What's wrong? Should be without appname. I tried the config.assets.paths but no luck. My app runs on fcgi (if that could mean anything) on the production server. Locally I use passenger and

[Rails] Send multiple emails

2013-07-06 Thread Paul Bergstrom
Any problems sending a lot of emails with rails like this: @members = Members.all @members.each do |m| MemberMailer.message(@message, m).deliver end -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

Re: [Rails] Rails 3 application capable of generating an offline version of itself for download as zip archive

2013-06-24 Thread Paul
It sounds like you might want to implement an offline app instead. There is browser support in most browsers for appcache to make all your assets available offline, and there is the javascript call navigator.onLine that will tell you if you are offline or not. You'll have to create and maintain an

[Rails] Setting up a rails app in a relative path (using Apache and Passenger)

2013-06-14 Thread Paul
. So, mydomain.com already exists and is a PHP app. I want mydomain.com/railsto point to my rails app. It looks like this case was handled in Rails 2 with relative_url_root, but that was deprecated a long time ago. What is the standard way to do this now? TIA, Paul -- You received this message

[Rails] Re: Getting json data to div and partial after ajax call?

2013-06-08 Thread Paul Bergstrom
Fernando Jesus wrote in post #571: Have u solve your problem? i have the same issue U_U but without coffeeScript Sorry to say, but no I didn't. Still looking. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Re: A simple javascript alert not working

2013-06-01 Thread Paul Bergstrom
Colin Law wrote in post #1110840: On 31 May 2013 18:36, Paul Bergstrom li...@ruby-forum.com wrote: If I have a file in view /test called index.js.erb and in it a simple alert(hello) shouldn't that run when I go to /test/index? It doesn't. I think you will have to give us a bit more detail

[Rails] Re: Re: A simple javascript alert not working

2013-06-01 Thread Paul Bergstrom
Colin Law wrote in post #1110879: On 1 June 2013 09:00, Paul Bergstrom li...@ruby-forum.com wrote: Not sure how I can explain it better. It's a very simple example. When going with the browser to an action with a corresponding *.js.erb file should the JavaScript in that file run, like alert

[Rails] Re: Re: Re: A simple javascript alert not working

2013-06-01 Thread Paul Bergstrom
or we can't help. Thank you for your help. Should this basic example work, onload? Or should I skip extra js-files? Am 01.06.2013 11:52 schrieb Paul Bergstrom li...@ruby-forum.com: -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google

[Rails] Re: Re: Re: A simple javascript alert not working

2013-06-01 Thread Paul Bergstrom
Colin Law wrote in post #1110893: On 1 June 2013 10:52, Paul Bergstrom li...@ruby-forum.com wrote: in the browser to see what is being sent to the browser. Colin Doesn't seem to load. This should be so incredible simple. Why doesn't it work? What have I missed? No idea what you mean

[Rails] Re: Re: Re: Re: A simple javascript alert not working

2013-06-01 Thread Paul Bergstrom
Norbert Melzer wrote in post #1110905: 2013/6/1 Paul Bergstrom li...@ruby-forum.com I mean, if your js-file is /app/views/test/index.js.erb AND your controller is /app/controllers/test_controller.rb AND you have route setup to the index action, then you have to point your browser to http

[Rails] Problems with compiling in development

2013-05-31 Thread Paul Bergstrom
I have a strange problem that I suspect has to do with compiling. In development do I need to do anything after I change the code? It still loads a file, looking in the log file, that it shouldn't. I thought Rails didn't compile in development. -- Posted via http://www.ruby-forum.com/. -- You

[Rails] Re: Problems with compiling in development

2013-05-31 Thread Paul Bergstrom
Kad Kerforn wrote in post #1110772: what do you mean by : Rails didn't compile in development can you copy your log file in a gist , Le vendredi 31 mai 2013 09:45:09 UTC+2, Ruby-Forum.com User a crit : Not sure what I mean. I just assumed it was something with compiling. But it could be

[Rails] Re: Re: Problems with compiling in development

2013-05-31 Thread Paul Bergstrom
Colin Law wrote in post #1110802: On 31 May 2013 15:21, Paul Bergstrom li...@ruby-forum.com wrote: I'm kind of lost with Rails right now. What was simple and beautiful is no more. I've never understood REST and I think this is what gives me problems. That and this compiling thing

[Rails] A simple javascript alert not working

2013-05-31 Thread Paul Bergstrom
If I have a file in view /test called index.js.erb and in it a simple alert(hello) shouldn't that run when I go to /test/index? It doesn't. -- 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] Getting json data to div and partial after ajax call?

2013-05-31 Thread Paul Bergstrom
I'm able to get json data back after an ajax call and into a div. But how do I get it into html, styled format? How about getting it to a partial? How do I do that in coffeescript? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google

[Rails] Re: Getting json data to div and partial after ajax call?

2013-05-31 Thread Paul Bergstrom
Benjamin Iandavid Rodriguez wrote in post #1110828: For what you say. After you get the JSON response the partial is already processed so you just need to update the correct div with the correct info. Use jQuery's append or html properties to update your divs. 2013/5/31 Paul Bergstrom li

[Rails] Re: Getting json data to div and partial after ajax call?

2013-05-31 Thread Paul Bergstrom
I get an array back in json. That is loaded but without styling. -- 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

[Rails] Re: Good Ruubyist way

2013-05-25 Thread Paul Julian
a = [1,2,3,4,5,6,7,8,9,10] b= a.reverse.reverse On Friday, May 24, 2013 9:56:39 AM UTC-4, Ruby-Forum.com User wrote: a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] b = a + [nil] p a #= [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] p b #= [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, nil] Is there any other Rubyist way to

Re: [Rails] Need help on #grep

2013-05-13 Thread Paul Makepeace
., ObjectSpace.each_object(Class).map { |x| x.to_s =~ /(.*)::.*stri/i and $1 }.compact.uniq = [RubyToken] ObjectSpace.each_object(Class).to_a.map(:to_s).grep(/(.*)::.*stri/i) { |_| $1 }.uniq = [RubyToken] Paul -- You received this message because you are subscribed to the Google Groups Ruby

[Rails] Search and routes

2013-05-07 Thread Paul Bergstrom
How do I define the route for a search form that goes to index action, which either lists all, if no search, or the search result? -- 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

Re: [Rails] Roll your own authentication?

2013-05-07 Thread Paul
+ for Devise I don't want to do all the work that has already been done for me by the Devise authors. I always generate the views and modify them to suit, and I generally create a partial to handle whatever login/logout/account settings links I need, but other than that, when writing a standard

[Rails] Using after_save in an acts_as_* plugin

2013-05-06 Thread Paul Ols
Hi folks! I'd like to add an acts_as_notified method to my active record classes (User, for example) which, when the model is saved triggers some other function, such as sending a mail, updating a log table etc. I can get the acts_as_notified class method in the class, but I'm having two

[Rails] has_and_belongs_to_many associations

2013-04-24 Thread Paul Ols
Hi! I have a User model that has_and_belongs_to_many Awards. The awards table is pre-populated, and there's an awards_users join table. In a rails console, If I do: u = User.find(1) u.awards.build(award_id: 1) the award model that is built is an actual Award model, not an AwardsUser model, like

[Rails] Re: has_and_belongs_to_many associations

2013-04-24 Thread Paul Ols
| 1 4 | 1 6 | 1 Thanks. Colin Law wrote in post #1106758: On 24 April 2013 09:19, Paul Ols li...@ruby-forum.com wrote: the award model that is built is an actual Award model, not an AwardsUser model, like I would expect. so, If i try to save the user model

[Rails] Using rack-offline with the asset pipeline (images not cached)

2013-04-22 Thread Paul
appear to be common. I suppose I could move the images into the /public folder. I think that would work, but I'd prefer to keep my configuration as standard as possible. Thanks, Paul -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group

Re: [Rails] rails authentication to devise

2013-04-19 Thread Paul
I would create a dummy rails app, add Devise and your model (probably called User), then study the differences between your current database and the one in your dummy app. I did that migration a couple of years ago and didn't have any problem. You just have to set the type of password hash

Re: [Rails] Single page application authentication and authorization

2013-03-21 Thread Paul
This doesn't quite answer your question, sorry, but this is how I handle it... For security reasons, I don't start my single page app unless the user is already logged in. That is, my splash screen is just a regular page, using Devise, and it does the standard POST when the user clicks the log in

Re: [Rails] restful_json - implement declarative, featureful backend JSON services in Rails 3.1+, 4+ quickly

2013-03-20 Thread Paul
Looks pretty cool at first glance! I was thinking of abstracting something similar. I'll try this first, though, on my next new project. On Tue, Mar 19, 2013 at 2:37 PM, gsw garyswea...@gmail.com wrote: Hey, We've been using this for a while in production and just made some security fixes

[Rails] Error installing Rails

2013-02-04 Thread Paul D.
Hi guys I'm a Rails virgin. I'm pulling my hair out with the install. So far, I've checked that I've got Ruby Gems, see below; Pauls-iMac:~ pauldoran$ ruby --version ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0] Pauls-iMac:~ pauldoran$ gem --version 1.3.6 I'm trying to

[Rails] ActiveResource: Disallowed type attribute: symbol in Rails 3.2.11

2013-01-14 Thread Paul
Has anyone started seeing the error: Disallowed type attribute: symbol when making an ActiveResource call after upgrading to Rails 3.2.11? I found this blog entry which seems to completely describe the problem:

Re: [Rails] ActiveResource: Disallowed type attribute: symbol in Rails 3.2.11

2013-01-14 Thread Paul
me an example of what could replace myvalue that would create havoc? On Mon, Jan 14, 2013 at 9:26 AM, Jordon Bedwell envyge...@gmail.com wrote: On Mon, Jan 14, 2013 at 8:23 AM, Paul p...@nines.org wrote: Has anyone started seeing the error: Disallowed type attribute: symbol I found

Re: [Rails] ActiveResource: Disallowed type attribute: symbol in Rails 3.2.11

2013-01-14 Thread Paul
! Sigh. On Mon, Jan 14, 2013 at 10:36 AM, Jordon Bedwell envyge...@gmail.comwrote: On Mon, Jan 14, 2013 at 8:59 AM, Paul p...@nines.org wrote: I didn't quite understand what you mean by that fix. Do you mean the security fix which caused my problem or the patch described by the blog post

[Rails] Bad idea to add/remove associations in after_find

2012-12-24 Thread Paul Olivers
I have 2 distinct types of users (artists and curators) in my system and they currently share all associations (eg has_one :portfolio). However, a curator shouldn't have a portfolio so I would like to only add that association when required. Obviously I could just return nil for that method, but

Re: [Rails] Rails seo friendly urls

2012-12-03 Thread paul h
that a product belongs to a category so you can use I think the OP wants to hide the params completely, could he not create a route that uses POST instead of GET? Paul .com/produce/fresh-georgia-peaches--17/product_details or .com/categories/produce/products/fresh-georgia-peaches--17

Re: [Rails] Rails Guide:For belongs_to associations, has_many inverse associations are ignored. not clear?

2012-11-13 Thread Paul Leader
in each other. Anyway, if anyone else does understand what that caveat actually means I'd appreciate an explanation. On Tuesday, November 13, 2012 4:17:22 AM UTC, Greg Donald wrote: On Mon, Nov 12, 2012 at 4:09 AM, Paul Leader pa...@paulleader.co.ukjavascript: wrote: Perhaps I'm bing a bit

[Rails] Rails Guide:For belongs_to associations, has_many inverse associations are ignored. not clear?

2012-11-12 Thread Paul Leader
is correct then I'm not sure I understand how the example works. Paul -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email

Re: [Rails] Hosting costs for a small up!

2012-11-09 Thread Paul Makepeace
/ If your start-up idea might even win some money :-) http://aws.amazon.com/startupchallenge/ Paul (who hosts also at Joyent, Rackspace and Bytemark (UK)) On Fri, Nov 9, 2012 at 9:57 AM, why-el wael.khobala...@gmail.com wrote: Hey friends! I am in the process of drafting a funding proposal

[Rails] Current recommended approach to chat room-type app?

2012-11-08 Thread Paul
Hi, I've been googling around looking for a good approach to doing live updates of my webpage. I've got a fairly extensive application already, using traditional rails, and I'd like to have a page update in real-time, hopefully without having to completely rewrite the app. One of the most

[Rails] link_to with additional data

2012-10-10 Thread paul h
? Thanks Paul -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. To view

Re: [Rails] link_to with additional data

2012-10-10 Thread paul h
Hi Norbert, Thanks for the reply, but can you elaborate a little? On Wednesday, October 10, 2012 12:01:54 PM UTC+1, Norbert Melzer wrote: Am 10.10.2012 09:47 schrieb paul h pa...@hollyer.me.uk javascript:: # I want to be able to display 'bar' on the contacts page = link_to Contacts

Re: [Rails] link_to with additional data

2012-10-10 Thread paul h
On Wednesday, October 10, 2012 2:30:57 PM UTC+1, jim wrote: On Wed, Oct 10, 2012 at 11:25 PM, paul h pa...@hollyer.me.ukjavascript: wrote: Hi Norbert, Thanks for the reply, but can you elaborate a little? On Wednesday, October 10, 2012 12:01:54 PM UTC+1, Norbert Melzer wrote: Am

Re: [Rails] link_to with additional data

2012-10-10 Thread paul h
On Wednesday, October 10, 2012 5:38:15 PM UTC+1, Matt Jones wrote: On Wednesday, 10 October 2012 06:25:25 UTC-7, paul h wrote: Hi Norbert, Thanks for the reply, but can you elaborate a little? On Wednesday, October 10, 2012 12:01:54 PM UTC+1, Norbert Melzer wrote: Am 10.10.2012 09

Re: [Rails] link_to with additional data

2012-10-10 Thread paul h
On Wednesday, October 10, 2012 3:28:45 PM UTC+1, Colin Law wrote: On 10 October 2012 08:47, paul h pa...@hollyer.me.uk javascript: wrote: Hi, rails 3.2.8 I must be missing something basic (and it's been driving me mad) because I am trying to send one additional data

Re: [Rails] How to read Microsoft document file in ruby on rails ?

2012-09-15 Thread Paul
The docx format is actually pretty simple: it is a zipped set of files. If you upload it to the server and unzip it, you'll see a set of xml files. You can poke around and figure out the format, or you can find a spec on line. On Thu, Sep 13, 2012 at 9:59 AM, Walter Lee Davis wa...@wdstudio.com

[Rails] Validating an association as a whole rather than per entry

2012-09-05 Thread Paul Makepeace
I have, `Transaction.has_many :splits` and Split has an amount:integer attribute. I'd like to ensure `transaction.splits = [split1, split2, ...]` the sum of split1.amount + split2.amount + ... == 0. It seems that :before_add deals with the splits one by one whereas what I'd like is to check

Re: [Rails] Restfull custom actions

2012-08-13 Thread Paul
I think you want member instead of collection in your route file. Collection is used when you don't have an id; member when you do. In your controller you are using the id, so I'm assuming that this is the URL you want: http://localhost:3000/customers/1/friend On Mon, Aug 13, 2012 at 3:42 PM,

[Rails] How transferable is a Ruby on Rails CMS?

2012-08-07 Thread Paul T.
Hi, I am looking into a new website, and a couple of potential designers have recommened using a CMS system built on Ruby on Rails ... one bespoke and one using a customised version of Refinery. Both have said that we will own all the coding, and so will in theory have the flexibility to host

Re: [Rails] Re: Rails' inflections are messy

2012-08-02 Thread Paul
index: GET /media show: GET /media/1 edit: GET /media/1/edit create: POST /media update: PUT /media/1 new: GET /media/new delete: DELETE /media I wasn't suggesting changing this retroactively, I was supporting the idea of the inflections gem, which would allow an replacement that didn't require

Re: [Rails] Re: Rails 2.3.5 to Rails 3.2 error

2012-08-01 Thread paul h
On Tuesday, July 31, 2012 7:48:08 PM UTC+1, Jodi wrote: I suggest opening your console - type Person - the console should return to_s of the class - if not, the person model isn't in your path better yet, take this opportunity to write some tests +1 - start with the Person model

Re: [Rails] Re: Rails' inflections are messy

2012-07-28 Thread Paul
I just ran into this again. I attempted to call a model Media, and the scaffold decided that I meant Medium, which is NOT a newspaper; it's someone who has a seance. As I often do in that situation, I deleted those files and changed the name to MediaOutlet so it would act predictably. Here's what

[Rails] Re: Managing long actions through better workflow

2012-07-20 Thread paul h
of assumptions based on the info supplied) BW Paul -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk

Re: [Rails] Rails' inflections are messy

2012-07-19 Thread Paul
I personally don't like them at all. I wish that all the names of controllers/routes/models were unchanged so I wouldn't have to keep deciding whether I needed to pluralize. I remember spending too much time trying to straighten out a scaffold I created named series. It created a model named

  1   2   3   4   5   6   7   >