« Back to channel list

#RubyOnRails - 04 November 2015

« Back 1 day Forward 1 day »
[00:00:07] edj: not really well
[00:00:15] edj: but basic functions and syntax
[00:00:27] edj: i know less about ruby and ror
[00:00:33] Radar: edj: what is this object called in Ruby? { a: 1, b: 2 } ?
[00:00:42] A124: has joined #RubyOnRails
[00:00:54] edj: no idea
[00:01:12] edj: i know more about javascript but even thats foggy
[00:01:16] OngakuMan: has joined #RubyOnRails
[00:01:22] Radar: Ok, start here: https://www.manning.com/books/the-well-grounded-rubyist-second-edition
[00:01:38] Radar: i also have a blog post with other resources: http://ryanbigg.com/2015/04/getting-started-with-ruby-and-rails/
[00:02:19] Radar: There's also https://external.codecademy.com/learn/ruby
[00:02:43] Radar: If you want to ask questions about ruby, ask them in #ruby. Questions about Rails are good in this channel.
[00:03:05] Radar: There are no dumb questions.
[00:03:37] edj: https://www.manning.com/books/the-well-grounded-rubyist-second-edition just as good as the free https://external.codecademy.com/learn/ruby
[00:04:00] EminenceHC: has joined #RubyOnRails
[00:04:10] Radar: There's more content in the book. The Codeacademy course will give you a good general overview.
[00:04:19] edj: because I'm super poor
[00:04:21] Radar: Spend this week playing around with just Ruby.
[00:04:52] momomomomo: has joined #RubyOnRails
[00:04:57] edj: and after that?
[00:05:08] Radar: We'll see how you're doing :)
[00:05:11] edj: or can i talk to you after that ?
[00:05:16] Radar: Ruby is your focus for this week.
[00:05:20] edj: so youll probably be here?
[00:05:29] Radar: I've been here for 10 years and I don't plan on leaving any time soon.
[00:05:35] edj: awesome
[00:05:41] edj: thank you so much.
[00:05:45] edj: i was so lost
[00:05:54] creyes: Radar: newfound respect. Not that I didn't before, but you're the man
[00:05:56] edj: see you in a week :)
[00:05:57] Radar: What OS are you using right now?
[00:06:12] edj: im using os 10.10.5
[00:06:14] hotpancakes: has joined #RubyOnRails
[00:06:15] Radar: creyes: getting newbies into the community is something I am extremely passionate about
[00:06:18] edj: or something
[00:06:31] Radar: edj: Ok then. Did you follow anything to install Ruby yet?
[00:06:37] edj: yes i did
[00:06:54] Radar: Ok, good.
[00:07:02] Radar: Ask in #ruby if you have any issues and there'll be someone there to help you.
[00:07:20] edj: how many hours should I do ruby this week?
[00:07:32] edj: 20? 40? 60?
[00:08:33] baweaver: I wouldn't put a set number of hours on it
[00:08:35] Radar: edj: Don't worry about that. Just do it when you can. That isn't me saying to do it all the time. Just when you can.
[00:08:37] baweaver: just work through stuff
[00:08:49] edj: thanks guys
[00:09:01] edj: it means alot
[00:09:04] chridal: has joined #RubyOnRails
[00:09:04] edj: see you in a week
[00:09:19] pyemkey: has joined #RubyOnRails
[00:09:34] Radar: edj: there are some exercises in https://github.com/turingschool/challenges if you run out of things to do.
[00:09:42] h7br1x: has joined #RubyOnRails
[00:09:49] Radar: https://github.com/turingschool/challenges/blob/master/deaf_grandma.markdown
[00:09:55] Radar: https://github.com/turingschool/challenges/blob/master/99_bottles.markdown
[00:10:02] Radar: I wish they were in some order!
[00:10:08] Radar: creyes: thanks for the kind words :)
[00:10:30] edj: Thanks!!
[00:11:02] baweaver: Project Euler, Project Rosalind, Code Wars, there are several out and about
[00:11:13] StaticVoid: Is TDD really used a lot in RoR? And should I start learning RoR with that ?
[00:11:21] Radar: baweaver: tbh I'd like somehting more hand-holdy than those
[00:11:31] creyes: Radar: still new to some of the basic Rails things (auth confuses the f*** out of me) but your multitenancy books are really well written
[00:11:37] Radar: baweaver: I like codeacademy and codeschool. They show you what you can do and then give you exercises.
[00:11:49] bonhoeffer: has joined #RubyOnRails
[00:11:54] baweaver: Just going off the hireable point
[00:12:02] baweaver: as a lot of people "borrow" questions from there.
[00:12:04] Radar: creyes: haha :) Keep practicing at it and you'll get better.
[00:12:16] baweaver: StaticVoid: testing is, tdd it depends.
[00:12:25] Radar: creyes: My favourite thing to do recently is to find a song on the piano just outside of my comfort zone, and then try to learn it.
[00:12:33] Radar: creyes: I suck so terribly the first couple of days
[00:12:45] Radar: creyes: But then I notice that I'm getting better at playing some of the trickier bars
[00:12:54] Radar: and it just totally comes down to practice. The more you practice something, the better you get
[00:13:08] baweaver: and then you see Racmnaninoff
[00:13:16] Radar: http://thetalentcode.com/book/ talks about this a lot
[00:13:24] Radar: baweaver: fuck that noise :P I don't have three hands!
[00:13:26] StaticVoid: It seems a steep learning curve, having to do both the testing code and the actual code
[00:14:00] hotpancakes: has joined #RubyOnRails
[00:14:21] baweaver: Radar - https://www.youtube.com/watch?v=SCm9O2KNEX4
[00:14:28] baweaver: that should keep you busy for a while
[00:14:46] boombadaroomba: has joined #RubyOnRails
[00:15:04] baweaver: https://www.youtube.com/watch?v=hnWo8PxrOR4 - this one is fairly easy starting out though :P
[00:15:13] Radar: baweaver: I am pretty terrible tbh
[00:15:20] Radar: anyway, back on topic
[00:15:25] baweaver: (wait for 0:29 on that second one :D)
[00:15:29] Radar: StaticVoid: I think applications without tests have a lot more bugs than those with tests.
[00:15:53] baweaver: that, and the cost of refactoring will screw you sideways without tests.
[00:16:01] Radar: StaticVoid: I wrote a blog post 5 years ago based on a true story: http://ryanbigg.com/2010/02/congratulations/
[00:16:16] baweaver: you _sure_ you didn't break someone elses feature with that new bit or edit?
[00:16:21] smathy: StaticVoid, all you have to learn is one method, assert. Everything else is gravy.
[00:16:24] Radar: StaticVoid: Without tests in an application, I have a hard time knowing if the changes I make _now_ are breaking code that was written eyars ago.
[00:16:30] StaticVoid: Radar: I can definitely see the advantage when adding to an existing app or when refactoring
[00:16:35] adavia: a requestes completed in 2703ms seems not so good huh
[00:16:52] StaticVoid: Agreed - I'll check that post - thanks
[00:17:12] pydave6367: has joined #RubyOnRails
[00:17:17] StaticVoid: Going off the Michael Hartl (SP?) tutorial - tests seem complicated
[00:17:27] smathy: adavia, depends what it is doing.
[00:17:42] Radar: StaticVoid: How so?
[00:17:57] Radar: StaticVoid: I think a few of his tests have a bit of fluff in them, but I want to hear your opinion.
[00:18:00] riotjones: has joined #RubyOnRails
[00:18:13] Aeyrix: The most complicated piece of testing is understanding how to break down a user story.
[00:18:18] Aeyrix: And also ensuring that you're covering all user stories.
[00:18:34] adavia: smathy: cross domain requests
[00:18:50] StaticVoid: Good point. I come from a business app dev background, functionality comes first, form later
[00:18:58] smathy: adavia, sorry, that doesn't really explain much to me.
[00:19:00] StaticVoid: so testing if a title shows up seems a lot of work
[00:19:35] StaticVoid: Radar: hope that makes sense
[00:19:40] smathy: StaticVoid, not as much as the work of fixing code if that test wasn't there to prevent your code going off track.
[00:19:44] adavia: smathy: im using httparty to access an external api
[00:19:59] smathy: adavia, ok, that doesn't sound like a cross domain request.
[00:20:36] adavia: smathy: isnt it doing a request do a different domain?
[00:21:06] StaticVoid: smathy : true, I guess I'm just impatient. When just starting it's easier to fire up the webserver and test the page/functionality manually, as everythingis stil simple
[00:21:19] Radar: StaticVoid: how then in 6 months will you test that functionality?
[00:21:39] Radar: StaticVoid: What if you change something now and it breaks, and then you deploy it? How is that found out before it gets out to your users?
[00:21:49] Radar: Testing is insurance for my code.
[00:21:58] smathy: adavia, well for a start, I don't know, it might be the same domain - but regardless, a "cross domain request" is, in the context of web requests, a specific thing: https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=cross%20domain%20request
[00:22:01] StaticVoid: Radar : Agreed. Write tests now or write tests later, right
[00:22:03] smathy: adavia, anyway...
[00:22:04] Radar: Tests say the code does the thing. Tests fail because the code isn't written. I write the code, which does the thing. Tests then pass.
[00:22:25] Radar: StaticVoid: If you write tests later you might be testing a bug... not that it happens that often, but it _could_ happen.
[00:22:44] adavia: smathy: ok yes make sense.. lets say an http request to an external api then
[00:22:52] momomomomo: has joined #RubyOnRails
[00:23:11] smathy: adavia, so you're just calling some API from within your request. So you're beholden to its response time, in which case 2.7s does not sound unusual for your total response time. But I still don't actually know what it's doing - which is what I'd need to know to know whether that was bad or not.
[00:23:11] jgt1: has joined #RubyOnRails
[00:23:48] Guest33_: has joined #RubyOnRails
[00:24:21] smathy: adavia, eg. if I login to some site, and it makes an API request, and the total login response takes 2.7s - but I only have to do it once every couple of weeks - then it's really not a problem.
[00:24:51] momomomomo: smathy: totally depends on how much I really want to get into that site
[00:25:01] momomomomo: smathy: if it's "meh" then I'm out after 1s
[00:25:12] momomomomo: and so are >70% of users
[00:25:21] smathy: adavia, if I'm viewing my dashboard, and it takes 2.7s to display it because the site is pulling some stats from some API each time it's rendered - then that's probably not ok.
[00:25:46] harishreddy: has joined #RubyOnRails
[00:25:48] adavia: smathy: will show you some code
[00:25:55] smathy: momomomomo, nice use of totally made up stats.
[00:26:10] MaDErroR123: has joined #RubyOnRails
[00:26:10] momomomomo: smathy: 90% of statistics are made up on the spot - Abraham Lincoln
[00:26:14] sevenseacat: has joined #RubyOnRails
[00:26:40] momomomomo: 74%would abandon mobile websites that don???t load within 5 seconds.
[00:26:57] adavia: smathy: https://gist.github.com/adavia/3fabf8e26edb1ad23168
[00:27:00] momomomomo: that's a stat
[00:27:17] momomomomo: from 2012ish, and that number has only gotten larger
[00:27:44] harishre_: has joined #RubyOnRails
[00:28:46] SeanLazer: has joined #RubyOnRails
[00:28:52] adavia: smathy: it usually takes up to 7500ms
[00:29:07] creyes: Here's a rough thought. I have a survey app that is doing a lot of stuff with the User model. I want to completely overhaul the authentication/authorization - best way to do it? Clone the app and manually remove all devise things?
[00:29:25] smathy: adavia, ok, and are these stats changing all the time?
[00:29:37] adavia: smathy: not really.. once a week
[00:29:52] smathy: adavia, so if I were you I'd cache the results locally.
[00:30:29] momomomomo: adavia: or set up a background job to update them periodically
[00:30:32] momomomomo: and store them in your own db
[00:30:53] momomomomo: that way you never have to break the cache for a user, but your background job will incur the overhead
[00:31:02] infamos: has joined #RubyOnRails
[00:32:06] Radar: creyes: why do you want to do that in the first place?
[00:32:11] yuujinlee: has joined #RubyOnRails
[00:32:33] adavia: momomomomo: dont really have much experience with background jobs but ill take a look at the delayed job gem
[00:33:06] creyes: my connection dropped, if someone answered could they please repost
[00:34:02] Radar: creyes: why do you want to do that in the first place?
[00:34:06] creyes: Radar: well I was talking with VeryBewitching and realized that everything I did was terrible, and it'd probably be easier to start the ath stuff over
[00:34:09] yuujinlee: Guys, new to Rails and need some advice. I want to create an Animal website for fun with categories (Cats, Dogs, Others) - Do I just create one model Animal? How would I connect one model to a category?
[00:34:34] momomomomo: yuujinlee: depends on what you want to do to that animal
[00:34:54] yuujinlee: well basically a website that will show all animals in the index page, with some filters to filter out dogs, cats
[00:34:57] creyes: I only have 1 user model, it's associated with survey replies and also is how people log in. I added profiel data to the user model. I started exploring options when I wanted to make an admin dashboard and realized I made lots of mistakes
[00:35:10] simplyianm: has joined #RubyOnRails
[00:35:46] sevenseacat: branch and refactor?
[00:35:47] pydave6367: has joined #RubyOnRails
[00:35:56] yuujinlee: Ideally when they register a new animal, they would choose if it is either a dog, cat, other...but do i need to a new model for each category? pretty confusing
[00:36:44] smathy: adavia, delayed job is not the right approach.
[00:36:48] VeryBewitching: creyes: Has this application been deployed?
[00:37:27] adavia: smathy: what would you recommend?
[00:37:30] smathy: adavia, that's an async / queuing gem.
[00:37:31] creyes: VeryBewitching: nope. woudl like to someday though
[00:37:39] smathy: adavia, I recommended caching, you should probably ask momomomomo ;)
[00:38:02] adavia: caching seems simpler
[00:38:05] momomomomo: smathy: caching incurs a cost on a user every X minutes/hours/etc. and also has more stale data
[00:38:13] VeryBewitching: creyes: That will make it much easier to change.
[00:38:19] momomomomo: if you background job every minute, you keep it fresh with no overhead to the user
[00:38:51] smathy: momomomomo, right, but I know where adavia is up to and don't want to talk him through setting up cron.
[00:38:58] smathy: (or alternatives)
[00:39:01] craysiii: yuujinlee dog, cat etc are animals themselves, unless you are talking about specific breeds and such. regardless, you could have a "category" model and make a reference to it in your animal model
[00:39:13] momomomomo: adavia: smathy agreed - adavia, just go with the easiest solution until you get a handle on what you're doing
[00:39:18] momomomomo: for now, that's probably caching
[00:39:37] adavia: damn i felt limited
[00:39:48] momomomomo: by the time you want to do a background job, you might say, "hey this is silly to query a php site, maybe I'll do something else"
[00:40:59] yuujinlee: I see, yeah basically a website that list all the famous animals on the web, like grumpy cat - would be in category cat
[00:41:47] adavia: momomomomo: btw in case i want to do a background job, what gem or tool would you recommend?
[00:42:09] momomomomo: adavia: there are some built into rails now, but I wouldn't use those - I'd use https://github.com/mperham/sidekiq
[00:42:26] annlewis: has joined #RubyOnRails
[00:42:53] StaticVoid: has joined #RubyOnRails
[00:44:30] edj: should i be taking notes?
[00:44:47] apotry: has joined #RubyOnRails
[00:45:03] smathy: adavia, !aj
[00:45:03] helpa: adavia: http://guides.rubyonrails.org/active_job_basics.html
[00:46:14] mary5030: has joined #RubyOnRails
[00:46:24] adavia: smathy: isnt this async also?
[00:46:32] momomomomo_: has joined #RubyOnRails
[00:47:05] smathy: yuujinlee, you would have two models, Animal and Category. An Animal would belong_to :category
[00:47:11] smathy: yuujinlee, !associations
[00:47:11] helpa: yuujinlee: http://guides.rubyonrails.org/association_basics.html - Active Record Association Basics by Mike Gunderloy
[00:47:28] smathy: adavia, "background job" is another way of saying "async" - yes.
[00:49:04] smathy: adavia, momomomomo does seemed to have used the term to mean two different things, the other thing he was talking about is a cron job.
[00:49:44] momomomomo: you can set up sidekiq as a cron service
[00:49:51] momomomomo: with a gem like sidetiq or similar
[00:50:01] one_zero: has joined #RubyOnRails
[00:50:15] craysiii: whenever gem can set up cron jobs.
[00:50:21] smathy: adavia, that exists outside/above Rails (although there are some gems for interacting with cron from ruby) and runs a command on a schedule, for Rails you'd usually make a rake task for it to call.
[00:50:45] adavia: yes i see
[00:51:28] momomomomo: :| that's much more awkward than using a gem to handle that smathy
[00:51:37] TheNet: has joined #RubyOnRails
[00:52:08] momomomomo: adavia: here is a basic sidetiq example https://github.com/tobiassvn/sidetiq/wiki/Basic-Usage
[00:52:20] momomomomo: just a ruby class, no external files / cron setup etc
[00:52:23] smathy: momomomomo, whether you use a gem or not, you still need to run an external service to execute those jobs on schedule.
[00:52:31] smathy: ...including with sidetiq.
[00:53:24] momomomomo: just sidekiq needs to be started
[00:53:30] momomomomo: but yes, that's a separate process from rails
[00:53:43] baweaver: has joined #RubyOnRails
[00:53:48] wethu: has joined #RubyOnRails
[00:53:55] Axsuul: has joined #RubyOnRails
[00:53:59] mozzarella: has joined #RubyOnRails
[00:54:00] smathy: No, not just sidekiq.
[00:54:03] bruno-: has joined #RubyOnRails
[00:54:03] smathy: ...also redis.
[00:54:14] smathy: It's important for you to be sure you're giving adavia the full story here. Pointing him at the sidekiq gem as you did initially doesn't really do him much of a favor.
[00:54:23] SeanLazer: has joined #RubyOnRails
[00:54:39] Axsuul: has joined #RubyOnRails
[00:54:42] momomomomo: smathy: I already seconded your advice on the caching until he knows what to do with background jobs
[00:54:53] momomomomo: this is just us pedanting over background jobs
[00:55:06] Aeyrix: Not really.
[00:55:23] Aeyrix: One method is only half working, somewhat inexplicably from the perspective of adavia.
[00:55:37] Aeyrix: No prizes for guessing which. Here's a hint: It's missing a component.
[00:55:51] smathy: momomomomo, you should feel free to not recommend things when he asks then, if you just point him at sidekiq for running scheduled tasks you're doing him a disservice.
[00:56:10] adavia: my question is if i really need a background job for this use case. or just caching as smathy stated
[00:56:41] smathy: adavia, are you happy for one user a day (or however often you want to refresh your data) to experience a delay?
[00:56:42] momomomomo: adavia: You asked what I would use for background jobs - I would use sidekiq for background jobs. You start two processes: Redis & Sidekiq, in addition to rails
[00:56:58] Axsuul: has joined #RubyOnRails
[00:57:06] momomomomo: adavia: however, until you NEED that, then go ahead and use caching; don't over optimize
[00:57:27] simkessy: has joined #RubyOnRails
[00:58:14] yuujinlee: thanks smathy
[00:58:19] adavia: ok now i get it
[00:58:58] adavia: anyways thanks smathy and momomomomo
[00:59:11] smathy: yuujinlee, you're welcome.
[00:59:15] smathy: adavia too.
[01:00:25] bbrowning: has joined #RubyOnRails
[01:00:44] rgtk: has joined #RubyOnRails
[01:01:23] jahbrewski: has joined #RubyOnRails
[01:01:32] mary5030: has joined #RubyOnRails
[01:02:48] rgtk: has joined #RubyOnRails
[01:03:18] mary5030: has joined #RubyOnRails
[01:04:43] rgtk: has joined #RubyOnRails
[01:05:24] StaticVoid: What is typically used for an IDE? RubyMine?
[01:06:37] rgtk: has joined #RubyOnRails
[01:07:10] sevenseacat: we don't typically use IDEs
[01:08:30] rgtk: has joined #RubyOnRails
[01:08:30] craysiii: sublimetext3
[01:09:19] StaticVoid: Interesting. Does anyone know if there are more devs running on windows or Linux/Mac (for RoR)
[01:09:45] fluxsource: has joined #RubyOnRails
[01:09:59] sevenseacat: for rails? definitely not windows
[01:10:25] rgtk: has joined #RubyOnRails
[01:10:55] StaticVoid: sevenseacat: that's sorta what I expected :) (I'm obviously super new to RoR)
[01:11:09] stannard: has joined #RubyOnRails
[01:11:43] vigintas: has joined #RubyOnRails
[01:12:04] d34th4ck3r: has joined #RubyOnRails
[01:12:16] rgtk: has joined #RubyOnRails
[01:13:14] roxtrongo: has joined #RubyOnRails
[01:14:10] rgtk: has joined #RubyOnRails
[01:14:55] Axsuul: has joined #RubyOnRails
[01:14:58] FailBit: I feel guilty
[01:15:01] FailBit: User.order(id: :asc).each_instance{|u| sad_fucks << u if not u.valid? }
[01:16:09] symbole: has joined #RubyOnRails
[01:16:18] bonhoeffer: has joined #RubyOnRails
[01:16:49] sevenseacat: for writing `if not`? i would, too
[01:17:18] ebbflowgo: has joined #RubyOnRails
[01:17:25] FailBit: no, because of the fact that our massive migration to postgresql caused a bunch of records to become invalid
[01:17:38] rgtk_: has joined #RubyOnRails
[01:17:48] jarray52: has joined #RubyOnRails
[01:17:59] Joufflu: has joined #RubyOnRails
[01:18:54] stannard: has joined #RubyOnRails
[01:19:11] xcm: has joined #RubyOnRails
[01:19:32] rgtk: has joined #RubyOnRails
[01:20:21] chibs: has joined #RubyOnRails
[01:20:31] jahbrewski: has joined #RubyOnRails
[01:21:27] Axsuul: has joined #RubyOnRails
[01:21:43] rgtk: has joined #RubyOnRails
[01:21:47] FailBit: I am doing one on tags now
[01:21:54] FailBit: already found 30 invalid records
[01:22:12] FailBit: decided to call the array containing the bad tags "fuck_activerecord"
[01:22:49] chibs: has joined #RubyOnRails
[01:23:36] rgtk: has joined #RubyOnRails
[01:24:09] sevenseacat: I'm not sure it's activerecord's fault
[01:25:03] FailBit: I just don't like AR very much
[01:25:31] rgtk: has joined #RubyOnRails
[01:25:49] FailBit: the query syntax is dismal compared to e.g. origin
[01:25:56] FailBit: arel_table, bleck
[01:26:11] sevenseacat: well arel_table isnt ActiveRecord
[01:26:14] FailBit: not to mention certain quirks like :inverse_of not implying the foreign key
[01:26:55] sevenseacat: though arel is a dependency of AR
[01:27:12] rgtk: has joined #RubyOnRails
[01:27:24] chills42: has joined #RubyOnRails
[01:27:25] TheNet: has joined #RubyOnRails
[01:28:39] mdst: has joined #RubyOnRails
[01:29:17] rgtk: has joined #RubyOnRails
[01:30:20] simkessy: If anyone has worked with gmaps4rails I could use some assistance with this question regarding the markers on hover: http://stackoverflow.com/questions/33511534/gmaps4rails-markers-not-being-removed-instead-overlapping
[01:31:12] rgtk: has joined #RubyOnRails
[01:32:35] shibabu: has joined #RubyOnRails
[01:32:41] blackmes1: has joined #RubyOnRails
[01:32:42] rgtk: has joined #RubyOnRails
[01:33:15] chills42: has joined #RubyOnRails
[01:34:11] trosborn: has joined #RubyOnRails
[01:34:38] rgtk: has joined #RubyOnRails
[01:37:21] tuelz1: has joined #RubyOnRails
[01:38:06] rgtk: has joined #RubyOnRails
[01:38:55] nya: has joined #RubyOnRails
[01:39:36] willardg: has joined #RubyOnRails
[01:39:37] KensoDev: has joined #RubyOnRails
[01:39:40] Lightsword: has joined #RubyOnRails
[01:39:58] Lightsword: has left #RubyOnRails: ()
[01:40:16] rgtk: has joined #RubyOnRails
[01:41:59] rgtk: has joined #RubyOnRails
[01:42:40] simkessy: Nevermind, figured it out :)
[01:43:05] annlewis: has joined #RubyOnRails
[01:43:22] borodin: has joined #RubyOnRails
[01:44:04] rgtk: has joined #RubyOnRails
[01:45:47] rgtk: has joined #RubyOnRails
[01:47:26] rhizome: has joined #RubyOnRails
[01:47:30] Bloomer: has joined #RubyOnRails
[01:47:42] edj: has joined #RubyOnRails
[01:48:21] stannard: has joined #RubyOnRails
[01:48:42] edj: has joined #RubyOnRails
[01:48:48] edj: radar are you there?
[01:49:19] edj: how long would you guess that it would take me to become a hirable developer?
[01:49:26] rgtk__: has joined #RubyOnRails
[01:49:47] edj: because i have until august
[01:49:59] rhizome: what do you already know?
[01:50:06] edj: not much
[01:50:13] rhizome: well you know how to get on irc
[01:50:18] edj: i know some html/css
[01:50:24] edj: some ruby/rails
[01:50:24] bonhoeffer: if i wanted to limit my sql queries in AR and get other join fields, is there a way to change SELECT "field_data".* . . . to SELECT FIELD_DATA.*, RELATIONSHIP.NAME . . . etc
[01:50:26] edj: not much
[01:50:48] rhizome: bonhoeffer: db2?
[01:51:03] bonhoeffer: at that point, it would no longer be a strict AR object that is returned, but i hate doing lots of queries ??? so maybe i should do find_by_sql
[01:51:12] bonhoeffer: rhizome: sorry? db2?
[01:51:26] Radar: edj: you have until August... next year?
[01:51:29] rhizome: it's IBM's database server
[01:51:32] pydave6367: has joined #RubyOnRails
[01:51:33] sevenseacat: bonhoeffer: are you looking for the `select` method?
[01:51:39] rgtk: has joined #RubyOnRails
[01:51:39] rhizome: i associated it with allcaps stuff like that
[01:51:41] bonhoeffer: rhizome: yeah ??? got it
[01:51:48] Radar: edj: that's plenty of time :)
[01:52:01] bonhoeffer: sevenseacat: yeah ??? i???m an old sql user, will look that up in the docs
[01:52:07] edj: and is freelance work easy to consistantly get if i know what im doing?
[01:52:31] Radar: edj: It can be. I would recommend finding somewhere locally that you could work for first.
[01:52:58] bonhoeffer: sevenseacat: <??? http://guides.rubyonrails.org/active_record_querying.html#selecting-specific-fields FTW!
[01:53:33] rgtk: has joined #RubyOnRails
[01:53:41] edj: thanks again
[01:53:47] bonhoeffer: in the docs, select is a way to downselect fields, but i???m going to guess it works to increase fields
[01:54:31] tjbiddle: has joined #RubyOnRails
[01:55:17] d34th4ck3r: has joined #RubyOnRails
[01:55:25] rgtk: has joined #RubyOnRails
[01:55:32] bonhoeffer: yes ??? works well, cool
[01:55:36] Pazician: has joined #RubyOnRails
[01:56:27] bruno-: has joined #RubyOnRails
[01:57:20] rgtk: has joined #RubyOnRails
[01:57:43] chridal: has joined #RubyOnRails
[01:59:12] rgtk: has joined #RubyOnRails
[01:59:19] mozzarella: has joined #RubyOnRails
[02:00:19] roamingdog: has joined #RubyOnRails
[02:00:20] peterhil: has joined #RubyOnRails
[02:00:57] rgtk: has joined #RubyOnRails
[02:02:47] rgtk: has joined #RubyOnRails
[02:03:17] twilling: has joined #RubyOnRails
[02:03:42] maxz: has joined #RubyOnRails
[02:03:45] tuelz1: has joined #RubyOnRails
[02:04:17] smathy: has joined #RubyOnRails
[02:04:54] rgtk: has joined #RubyOnRails
[02:05:05] RandyT: has joined #RubyOnRails
[02:06:47] rgtk: has joined #RubyOnRails
[02:06:58] DLSteve: has joined #RubyOnRails
[02:07:04] hackeron: has joined #RubyOnRails
[02:10:13] rgtk: has joined #RubyOnRails
[02:11:36] pyemkey: has joined #RubyOnRails
[02:11:42] bit_owl: has joined #RubyOnRails
[02:12:19] jaequery: has joined #RubyOnRails
[02:12:28] rgtk: has joined #RubyOnRails
[02:14:20] rgtk: has joined #RubyOnRails
[02:17:50] rgtk_: has joined #RubyOnRails
[02:18:48] riotjones: has joined #RubyOnRails
[02:19:38] riotjones: has joined #RubyOnRails
[02:20:50] htmldrum: has joined #RubyOnRails
[02:21:15] Trynemjoel: has joined #RubyOnRails
[02:21:35] rgtk: has joined #RubyOnRails
[02:22:14] benlieb: has joined #RubyOnRails
[02:22:19] d34th4ck3r: has joined #RubyOnRails
[02:22:29] stannard: has joined #RubyOnRails
[02:25:25] rgtk: has joined #RubyOnRails
[02:25:49] jaequery: has joined #RubyOnRails
[02:27:24] rgtk: has joined #RubyOnRails
[02:29:31] rgtk: has joined #RubyOnRails
[02:30:13] roamingdog: has joined #RubyOnRails
[02:30:37] FDostoyevsky: has joined #RubyOnRails
[02:31:23] johnflux: has joined #RubyOnRails
[02:31:23] johnflux: has joined #RubyOnRails
[02:31:26] rgtk: has joined #RubyOnRails
[02:32:21] roxtrongo: has joined #RubyOnRails
[02:33:17] rgtk: has joined #RubyOnRails
[02:33:57] simplyianm: has joined #RubyOnRails
[02:35:05] jgt1: has joined #RubyOnRails
[02:35:11] rgtk: has joined #RubyOnRails
[02:35:36] DLSteve: has joined #RubyOnRails
[02:35:55] blackmes1: has joined #RubyOnRails
[02:36:47] mozzarella: has joined #RubyOnRails
[02:37:05] rgtk: has joined #RubyOnRails
[02:38:48] TheNet: has joined #RubyOnRails
[02:39:01] rgtk: has joined #RubyOnRails
[02:40:05] roamingdog: has joined #RubyOnRails
[02:40:40] FDostoyevsky: has joined #RubyOnRails
[02:40:53] rgtk: has joined #RubyOnRails
[02:42:48] rgtk: has joined #RubyOnRails
[02:43:51] annlewis: has joined #RubyOnRails
[02:44:33] rgtk: has joined #RubyOnRails
[02:45:45] Bloomer: has joined #RubyOnRails
[02:46:18] stannard: has joined #RubyOnRails
[02:46:36] rgtk: has joined #RubyOnRails
[02:46:58] drbayer: has joined #RubyOnRails
[02:48:03] Limix: has joined #RubyOnRails
[02:50:06] rgtk_: has joined #RubyOnRails
[02:50:44] beauby: has joined #RubyOnRails
[02:52:01] Limix: has joined #RubyOnRails
[02:52:17] rgtk: has joined #RubyOnRails
[02:53:50] rgtk: has joined #RubyOnRails
[02:54:14] glaksmono: has joined #RubyOnRails
[02:54:17] glaksmono: anyone is around?
[02:54:39] Radar: HELPA HAS SPOKEN
[02:55:19] sevenseacat: all hail helpa.
[02:56:02] sevenseacat: ACTION resumes bashing elasticsearch
[02:56:04] shibabu: has joined #RubyOnRails
[02:56:06] rgtk: has joined #RubyOnRails
[02:56:53] bonhoeffer: has joined #RubyOnRails
[02:57:04] koprom: has joined #RubyOnRails
[02:57:31] bruno-: has joined #RubyOnRails
[02:58:00] rgtk: has joined #RubyOnRails
[02:59:53] rgtk: has joined #RubyOnRails
[03:00:33] miiiiiiike1: has joined #RubyOnRails
[03:01:36] mloy_: has joined #RubyOnRails
[03:01:44] rgtk: has joined #RubyOnRails
[03:01:53] roxtrongo: has joined #RubyOnRails
[03:02:55] Radar: glaksmono: Do you have a question?
[03:03:34] rgtk: has joined #RubyOnRails
[03:04:03] drale2k: has joined #RubyOnRails
[03:05:30] rgtk: has joined #RubyOnRails
[03:06:02] wilsonc91: has joined #RubyOnRails
[03:06:13] sevenseacat: Radar: if I've indexed a date field in ES, how can i search for eg. '23-02-1992' and make it work correctly >_<
[03:07:07] smoitra: has joined #RubyOnRails
[03:07:24] rgtk: has joined #RubyOnRails
[03:07:27] willardg: has joined #RubyOnRails
[03:07:35] Radar: sevenseacat: Can you show me the code that you've used to create the index?
[03:08:58] tuelz1: has joined #RubyOnRails
[03:08:59] sevenseacat: this is what i have atm - https://gist.github.com/sevenseacat/f775da66620084435302 which works fine when they just enter some text string as `query` - now I have the requirement to search via candidate dob
[03:09:19] rgtk: has joined #RubyOnRails
[03:09:30] elektronaut: has joined #RubyOnRails
[03:09:37] leeky: has joined #RubyOnRails
[03:09:44] sevenseacat: eg. `bob "23-03-1992"`
[03:09:52] Limix: has joined #RubyOnRails
[03:10:14] Bloomer: has joined #RubyOnRails
[03:10:15] Radar: sevenseacat: can you show me the output from localhost:9200/the-index-name please?
[03:10:44] sevenseacat: I didn't even know that was a thing! arr that tells me whats being indexed
[03:10:59] jaequery: has joined #RubyOnRails
[03:11:11] rgtk: has joined #RubyOnRails
[03:11:33] sevenseacat: Radar: added to gist
[03:11:57] Radar: Ok, so it's type: date at least.
[03:12:04] Radar: Give me a moment to tinker here.
[03:12:23] sevenseacat: I've been stuffing around a bit with indexing the dob directly, and indexing a formatted version in formatted_dob, and it seems its kept both
[03:13:05] Radar: and `bob "23-03-1992"` is your query string?
[03:13:23] sevenseacat: thats what I'd like the user to be able to enter
[03:13:31] Radar: Ok. Let me fiddle :)
[03:13:52] sevenseacat: (well ideally I'd like to actually set up a search form with more than one box, but hey)
[03:14:41] rgtk: has joined #RubyOnRails
[03:16:25] twilling: has joined #RubyOnRails
[03:16:54] rgtk: has joined #RubyOnRails
[03:18:40] sevenseacat: I already know I'm going to have problems because I'm indexing more than one date, but I figure only one field is likely to match a date of birth
[03:18:44] ptsdan: has joined #RubyOnRails
[03:18:47] rgtk: has joined #RubyOnRails
[03:18:53] ebbflowgo: has joined #RubyOnRails
[03:18:59] Radar: sevenseacat: I reckon you're going to need to format the date in the search query
[03:19:21] Radar: I am not certain about it.
[03:19:23] sevenseacat: so in my search_formatted, pluck out dates, parse+reformat?
[03:19:38] sevenseacat: *search_submitted
[03:19:40] Radar: Actually this seems to be working fine for me regardless of how the date is formatted. Tinkering some more.
[03:19:40] sevenseacat: whatever I called it
[03:19:45] wilsonc91: has joined #RubyOnRails
[03:19:52] sevenseacat: I can't get any matching on date to work at all
[03:20:40] Radar: I have got it matching on the date, but it returns me the wrong record.
[03:20:57] Radar: i.e. my q is "Ryan 04-12-1987" and it's returning a record for Steve, who has the same date_of_birth
[03:21:38] ebbflowgo: has left #RubyOnRails: ()
[03:21:50] hardtail: howdy sevenseacat, hope you are well today!
[03:22:15] rgtk: has joined #RubyOnRails
[03:22:47] sevenseacat: Hardtail: howdy :) I'd be better if I could get elasticsearch to behave!
[03:23:35] Radar: sevenseacat: http://localhost:9200/people/person/1/_explain?q=04-12-1987 does something like that work for you?
[03:23:40] Radar: Where people is the index name and person is the type
[03:24:10] sevenseacat: https://gist.github.com/sevenseacat/b3dca007626cb820c001 is what I have atm - like that record should return from that query, right?
[03:24:15] hardtail: sevenseacat I am sure between the two of you it won't be much longer until it does, lol :)
[03:24:15] sevenseacat: lemme check that
[03:24:29] rgtk: has joined #RubyOnRails
[03:25:05] sevenseacat: ES is a big black box to me - if this was solr I could nut it out lol
[03:25:59] baweaver: why is it that params.to_h drops params?
[03:26:01] rgtk: has joined #RubyOnRails
[03:26:06] baweaver: seems pretty stupid
[03:26:35] sevenseacat: Radar: it returns a result (which is weird because the Ruby version doesn't), but I can see it's splitting up the date and doing individual matching
[03:26:38] Radar: sevenseacat: this'll be much easier if you could split the search field up into name + date_of_birth fields.
[03:26:46] sevenseacat: yeah I think I'll have to
[03:28:04] rgtk: has joined #RubyOnRails
[03:30:07] rgtk: has joined #RubyOnRails
[03:32:09] withanx: has joined #RubyOnRails
[03:33:58] Coldblackice: has joined #RubyOnRails
[03:34:20] baweaver: has joined #RubyOnRails
[03:35:56] jgt1: has joined #RubyOnRails
[03:37:55] Axsuul: has joined #RubyOnRails
[03:38:19] EminenceHC: has joined #RubyOnRails
[03:39:06] Axsuul: has joined #RubyOnRails
[03:41:36] roamingdog: has joined #RubyOnRails
[03:44:31] d34th4ck3r: has joined #RubyOnRails
[03:44:36] annlewis: has joined #RubyOnRails
[03:46:02] arooni: has joined #RubyOnRails
[03:50:18] hotpancakes: has joined #RubyOnRails
[03:53:48] Bloomer: has joined #RubyOnRails
[03:56:36] Pazician: has joined #RubyOnRails
[03:56:42] Limix: Hi, is there a way to update a field on a record without having it???s updated_at be updated?
[03:56:54] duncannz: has joined #RubyOnRails
[03:56:58] pydave6367: has joined #RubyOnRails
[03:57:11] Motoservo: has joined #RubyOnRails
[03:58:31] bruno-: has joined #RubyOnRails
[03:59:23] tjbiddle: has joined #RubyOnRails
[03:59:34] shibabu: has joined #RubyOnRails
[03:59:34] yogeshrt: has joined #RubyOnRails
[03:59:37] Aeyrix: Why would you want that
[03:59:43] Aeyrix: that kind of defeats the purpose of the field
[04:01:10] Aeyrix: You can use update_column, if you actually need to do that. Or you can disable timestamp updating on the model.
[04:01:30] sevenseacat: so close to figuring this out
[04:01:38] sevenseacat: then i can celebrate with lunch
[04:02:24] MaDErroR123: has joined #RubyOnRails
[04:02:55] chibs: has joined #RubyOnRails
[04:04:55] Radar: Limix: Aeyrix is right. Use update_column.
[04:05:02] Radar: ACTION goes and washes himself after that first sentence
[04:05:07] Limix: thank you
[04:05:34] glaksmono: has joined #RubyOnRails
[04:06:15] hnanon: has joined #RubyOnRails
[04:06:40] hnanon: Radar: Here?
[04:06:46] Radar: hnanon: Always.
[04:06:54] Limix: Aeyrix, I am trying to create background syncing service. I need to add a foreign key to the model though once it syncs but I don???t want to update the updated_at because otherwise I run into an endless loop when checking for newly updated records
[04:07:04] TheNet_: has joined #RubyOnRails
[04:07:20] hnanon: Cool. I remember a while back ago you said something about carts and orders being the same thing.
[04:07:28] atmosx_: has joined #RubyOnRails
[04:07:31] hnanon: Am I remembering correctly?
[04:07:35] Radar: hnanon: About 10 months ago.
[04:08:00] hnanon: Actually, yeah...about 10 months ago, maybe.
[04:08:13] bonhoeffer_: has joined #RubyOnRails
[04:08:14] hnanon: The only difference is the state?
[04:08:15] SeanLazer_: has joined #RubyOnRails
[04:08:16] Radar: Around the time that I was refactoring the app here away from doing carts and orders.
[04:08:23] Limix: Aeyrix, the syncing takes about 1-5 minutes, so by the end of the sync, if I update updated_at, I would either miss changes next cycle, or I would run into an endless loop
[04:08:28] bennysan: has joined #RubyOnRails
[04:08:36] iamdevnul_: has joined #RubyOnRails
[04:08:41] ewilliam_: has joined #RubyOnRails
[04:08:44] hnanon: So, what do you call it?
[04:08:48] Limix: I???m sure there is a better way, but this is how far my brain has pushed so far
[04:09:04] barttenbrinke_: has joined #RubyOnRails
[04:09:09] Aeyrix_: has joined #RubyOnRails
[04:09:15] Radar: hnanon: It's always called an order.
[04:09:16] mwlang_: has joined #RubyOnRails
[04:09:16] jxf_: has joined #RubyOnRails
[04:09:31] Karpah: has joined #RubyOnRails
[04:09:36] Guest46854: has joined #RubyOnRails
[04:09:38] Radar: hnanon: it goes through roughly the same states as shown here http://api.marketplacer.com/v2/invoices/
[04:09:53] Radar: hnanon: the basic states for an order are "new", "checkout" and "complete"
[04:09:54] lacrosse_: has joined #RubyOnRails
[04:10:01] jlyndon_: has joined #RubyOnRails
[04:10:03] crdpink: has joined #RubyOnRails
[04:10:03] Radar: "new" is that someone has added items to their cart, but hasn't gone to the checkout.
[04:10:04] Karpah: ACTION kicks other-self
[04:10:11] Aeyrix: Karpah: /msg nickserv ghost
[04:10:15] neilfse: has joined #RubyOnRails
[04:10:16] dotty_: has joined #RubyOnRails
[04:10:17] alexblom_: has joined #RubyOnRails
[04:10:30] BBHoss_: has joined #RubyOnRails
[04:10:34] joeytwiddle_: has joined #RubyOnRails
[04:10:46] AckZ_: has joined #RubyOnRails
[04:10:54] kaspergr1bbe: has joined #RubyOnRails
[04:10:58] blackmes1: has joined #RubyOnRails
[04:11:27] drale2k: has joined #RubyOnRails
[04:11:31] nogic: has joined #RubyOnRails
[04:11:39] hnanon: Radar: I see.
[04:11:41] wldcordeiro: has joined #RubyOnRails
[04:11:45] Senjai: has joined #RubyOnRails
[04:12:17] amitchellbullard: has joined #RubyOnRails
[04:12:20] sevenseacat: *runs an ES query and it works *tries a bunch of other stuff that doesnt work *goes back to original query and now it doesnt work
[04:12:26] sevenseacat: yeeeeeeeah boi
[04:12:43] nogic: has joined #RubyOnRails
[04:13:04] hnanon: Radar: I need to save carts, though, that will be checked out later by someone with higher privileges.
[04:13:07] theblang: has joined #RubyOnRails
[04:13:26] hnanon: How do you suggest they be saved?
[04:13:28] Radar: hnanon: So save them as orders which have a particular state.
[04:13:32] Meow-J_: has joined #RubyOnRails
[04:13:37] nogic: has joined #RubyOnRails
[04:13:56] hnanon: No mucking around with sessions?
[04:14:16] sevenseacat: *reimports data even though it hasnt changed and it all starts working again
[04:14:32] tris: has joined #RubyOnRails
[04:14:51] nogic: has joined #RubyOnRails
[04:14:58] Radar: hnanon: no sessions required
[04:15:05] Radar: well, to track the current order I guess
[04:15:15] Radar: but you're not going to be passing sessions between normal user and higher priv user
[04:15:29] sfr^: has joined #RubyOnRails
[04:15:40] PlasmaStar: has joined #RubyOnRails
[04:15:44] sevenseacat: *reloads unchanged code and it stops working again
[04:16:10] sevenseacat: there are ghosts in my machine.
[04:16:28] skarn: has joined #RubyOnRails
[04:16:30] mary5030: has joined #RubyOnRails
[04:16:30] universa1: has joined #RubyOnRails
[04:16:47] braincrash: has joined #RubyOnRails
[04:16:53] Aeyrix: sevenseacat: You need to throw that machine away right now tbh
[04:18:36] urkle: has joined #RubyOnRails
[04:20:26] riotjones: has joined #RubyOnRails
[04:21:09] ebryn: has joined #RubyOnRails
[04:23:12] _djbkd: has joined #RubyOnRails
[04:25:10] hnanon: Thanks, Radar.
[04:26:55] sevenseacat: https://gist.github.com/sevenseacat/6f221337c63943ff1196 hoo rah.
[04:27:21] pwnd_nsfw: has joined #RubyOnRails
[04:32:05] hotpancakes: has joined #RubyOnRails
[04:35:59] mary5030: has joined #RubyOnRails
[04:36:38] jgt1: has joined #RubyOnRails
[04:37:35] pawnbox: has joined #RubyOnRails
[04:37:37] glaksmono: has joined #RubyOnRails
[04:37:49] drale2k: has joined #RubyOnRails
[04:38:01] nogic: has joined #RubyOnRails
[04:41:57] hnanon: Radar: What if an order is new and the user leaves it to create another order, for whatever reason. How will he "access" it again so that adding new line items will be for the initial order?
[04:43:25] sevenseacat: how can you 'leave an order'?
[04:43:35] h7br1x: Hey guys, I'm using a belongs_to association, how would I write this in my BoxController? I want @ownwer = box.user_id so when I call @owner.name in the box show.html.erb It displays the user that owns that box's name.
[04:43:40] roamingdog: has joined #RubyOnRails
[04:44:18] hnanon: sevenseacat: I guess save an order.
[04:44:35] hnanon: That will be returned to later.
[04:44:55] CanTonic: has joined #RubyOnRails
[04:44:58] Bloomer: has joined #RubyOnRails
[04:45:03] sevenseacat: ecommerce systems do that?
[04:45:08] sevenseacat: never heard of that.
[04:45:16] hnanon: Mine needs to.
[04:45:25] annlewis: has joined #RubyOnRails
[04:45:34] sevenseacat: so you save the order in the db
[04:45:47] hnanon: Users will add to an order periodically.
[04:45:53] sevenseacat: also, what makes yours so special?
[04:46:19] hnanon: It's not for end users. It's for wholesalers.
[04:46:43] hnanon: Who compile an order over a couple of days.
[04:46:54] sevenseacat: multiple orders at the same time?
[04:47:09] sevenseacat: ACTION raises eyebrow
[04:47:09] hnanon: For different locations.
[04:47:20] sevenseacat: ok, so what exactly are you having problems with?
[04:48:32] hnanon: Nothing...yet. Just wondering how a user will add line items to a save order.
[04:48:55] h7br1x: hnanon: You would just save the record, then open it again as needed to make changes?
[04:49:04] sevenseacat: same way they would to any other order
[04:49:08] sevenseacat: I don't see the confusion
[04:49:15] h7br1x: ACTION is also lost.
[04:49:33] sevenseacat: find order, add line item, same order?
[04:49:45] hnanon: Normally, a user add line items to an order and checks out and the order is complete.
[04:49:52] chridal: has joined #RubyOnRails
[04:50:21] pawnbox_: has joined #RubyOnRails
[04:50:36] h7br1x: but the order wont reach checkout until the wholesalers have finished building it, no?
[04:50:45] hnanon: But how do I recall a specfic order when adding the line items.
[04:51:06] hnanon: Yes, I was talking about how it's done tradtionally.
[04:51:55] sevenseacat: hnanon: by ID?
[04:52:01] sevenseacat: same as any other activerecord object?
[04:52:13] sevenseacat: /orders/2 <- order ID 2
[04:53:25] fedexo: has joined #RubyOnRails
[04:53:26] hnanon: I think I'm confusing myself. I guess I'm wondering how when a user clicks "Add item to order" the item will be added to a specific order he has in mind.
[04:53:57] h7br1x: Through associations
[04:54:12] sevenseacat: thats an entirely different question
[04:54:14] h7br1x: http://guides.rubyonrails.org/association_basics.html
[04:54:22] sevenseacat: they would have to select an order, or have one 'active order'
[04:54:29] SteenJobs: has joined #RubyOnRails
[04:55:09] hnanon: sevenseacat: Yeah, that's what I mean. How would an old order become the "active order?"
[04:55:10] chridal: has joined #RubyOnRails
[04:55:23] sevenseacat: by you building an interface for them to set an active order?
[04:55:57] hnanon: Ok. So I'll need something like a current_order method.
[04:56:39] nertzy: has joined #RubyOnRails
[04:59:42] yfeldblum: has joined #RubyOnRails
[05:00:39] dopie: In my database I currently have phone_1 phone_2 phone_3 each corresponding to a set of the users phone number ex. 305 555 5555, how would I not have that in my table where 1 full number i.e. 305 555 555 would correspond to a phonumber
[05:00:44] dopie: phone number
[05:00:51] dopie: instead of me creating 3 fields
[05:00:55] hnanon: Thanks sevenseacat and h7br1x
[05:01:49] nogic: has joined #RubyOnRails
[05:02:21] h7br1x: dopie: phone:string ?
[05:02:51] nogic: has joined #RubyOnRails
[05:02:52] dopie: h7br1x, well the client has 3 fields
[05:03:38] h7br1x: So you have 3 fields for phone and you don't want that you want 1 field correct?
[05:04:03] dopie: correct, but the user sees 3 fields
[05:04:11] h7br1x: change the view file
[05:04:59] h7br1x: in your _form.html.erb change it from :phone_1, :phone_2, :phone_3 to :phone after creating the :phone field in your database
[05:06:04] annlewis: has joined #RubyOnRails
[05:06:21] roamingdog: has joined #RubyOnRails
[05:14:56] freezeve1: has joined #RubyOnRails
[05:16:59] roamingdog: has joined #RubyOnRails
[05:18:46] shinenelson: has joined #RubyOnRails
[05:19:01] hotpancakes: has joined #RubyOnRails
[05:20:48] krz: has joined #RubyOnRails
[05:24:39] mrd_: has joined #RubyOnRails
[05:28:42] JDeen: has joined #RubyOnRails
[05:28:42] pawnbox: has joined #RubyOnRails
[05:31:08] JDeen: I am wirting my first api using Rails, I think I got the auth right coupled with JWT. My question is -> for APIs, do we use PUT/DELETE methods etc for updating and deleting resources? Some one said we only use post. Thats why thought of asking.
[05:31:21] Jasaka: has joined #RubyOnRails
[05:31:35] rakm: has joined #RubyOnRails
[05:31:51] shibabu: has joined #RubyOnRails
[05:31:57] hotpancakes: has joined #RubyOnRails
[05:32:02] pawnbox: has joined #RubyOnRails
[05:33:27] edmondss: has joined #RubyOnRails
[05:35:16] infamos: has joined #RubyOnRails
[05:35:41] exadeci: has joined #RubyOnRails
[05:37:23] jgt1: has joined #RubyOnRails
[05:38:40] hotpancakes: has joined #RubyOnRails
[05:45:59] baweaver: has joined #RubyOnRails
[05:49:36] Klumben: has joined #RubyOnRails
[05:51:21] d34th4ck3r: has joined #RubyOnRails
[05:55:10] ur5us: has joined #RubyOnRails
[05:56:16] elton: has joined #RubyOnRails
[05:56:17] rvanlieshout: has joined #RubyOnRails
[05:56:35] Limix: has joined #RubyOnRails
[05:56:49] bphogan: has joined #RubyOnRails
[05:56:58] ur5us: has joined #RubyOnRails
[05:57:26] Pazician: has joined #RubyOnRails
[05:58:11] Radar: rvanlieshout.
[05:58:22] kies^: has joined #RubyOnRails
[05:58:56] lxsameer: has joined #RubyOnRails
[05:58:56] lxsameer: has joined #RubyOnRails
[05:59:41] rvanlieshout: another day in the office
[06:00:34] hotpancakes: has joined #RubyOnRails
[06:01:27] elton: has joined #RubyOnRails
[06:01:36] speaking1ode: has joined #RubyOnRails
[06:02:17] CanTonic: has joined #RubyOnRails
[06:02:53] speaking1ode: has left #RubyOnRails: ()
[06:03:19] chibs: has joined #RubyOnRails
[06:09:22] sevenseacat: here we are again. another day. just like the others.
[06:10:18] chridal: has joined #RubyOnRails
[06:10:33] mozzarella: https://www.youtube.com/watch?v=x3K1t0669no
[06:11:03] Radar: Every day is exactly the same.
[06:11:25] Radar: I typed that before I opened the youtube link but you all won't believe me
[06:11:56] dionysus69: has joined #RubyOnRails
[06:11:59] blackmes1: has joined #RubyOnRails
[06:12:05] rvanlieshout: but that youtube link contains lyrics...
[06:13:23] pyemkey: has joined #RubyOnRails
[06:15:02] annlewis: has joined #RubyOnRails
[06:15:09] shibabu: has joined #RubyOnRails
[06:16:59] kp666: has joined #RubyOnRails
[06:18:22] chridal: has joined #RubyOnRails
[06:18:36] yogeshrt: has joined #RubyOnRails
[06:18:38] Axsuul: has joined #RubyOnRails
[06:18:42] d34th4ck3r: has joined #RubyOnRails
[06:18:58] oscarb92: has joined #RubyOnRails
[06:20:33] chrissonar: has joined #RubyOnRails
[06:21:11] riotjones: has joined #RubyOnRails
[06:22:05] sypheren: has joined #RubyOnRails
[06:22:44] kp666: has joined #RubyOnRails
[06:25:06] hotpancakes: has joined #RubyOnRails
[06:25:56] kp666: has joined #RubyOnRails
[06:27:35] pyemkey: has joined #RubyOnRails
[06:30:23] privacyid01: has joined #RubyOnRails
[06:32:09] dionysus69: has joined #RubyOnRails
[06:33:01] simplyianm: has joined #RubyOnRails
[06:33:26] privacyid01: guys why I can't add record with curl?? I have create the model with scaffold
[06:33:45] Miron: has joined #RubyOnRails
[06:33:56] sevenseacat: not enough info to say, also we're also not all guys here
[06:34:01] sevenseacat: what error are you getting?
[06:34:18] privacyid01: sorry about that
[06:34:43] privacyid01: when I execute the curl it's just return some weird html code
[06:35:07] krz: same. "curl" returns something "weird"
[06:35:11] privacyid01: curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d ' {"user":{"username":"alvian","title":"makanan","text":"asdqwerzxc"}}' http://localhost:3000/users
[06:35:20] chridal: has joined #RubyOnRails
[06:35:27] privacyid01: thats how I use the curl
[06:35:45] sevenseacat: and what do you get back?
[06:35:49] kp666: has joined #RubyOnRails
[06:35:52] neanderslob_: has joined #RubyOnRails
[06:36:03] jessemcgilallen: has joined #RubyOnRails
[06:36:19] helpa: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[06:36:31] privacyid01: idk what is it, it's some like html code from an error callback
[06:36:47] krz: the error should be in there
[06:36:49] sevenseacat: well we cant help you fix it without knowing what it is
[06:37:22] dikaio: has joined #RubyOnRails
[06:38:06] jgt1: has joined #RubyOnRails
[06:38:41] pawnbox: has joined #RubyOnRails
[06:39:35] privacyid01: ok I have export the ouput to file and the title is Action Controller: Exception caught
[06:39:43] privacyid01: its a html page
[06:40:22] sevenseacat: we're getting closer
[06:40:23] aganov: has joined #RubyOnRails
[06:40:27] sevenseacat: can you share the actual error in a gist?
[06:41:03] skyjumper: has joined #RubyOnRails
[06:41:22] startupality: has joined #RubyOnRails
[06:41:48] elton: has joined #RubyOnRails
[06:42:02] privacyid01: https://gist.github.com/buncismamen/53e92614da9b6145605f
[06:42:46] joeytwiddle: has joined #RubyOnRails
[06:43:15] sevenseacat: ok, you haven't provided an authenticity token as part of your request
[06:43:27] Miron: has joined #RubyOnRails
[06:43:43] privacyid01: so how to provide it ?
[06:44:13] krz: privacyid01: for your reference https://gist.github.com/buncismamen/53e92614da9b6145605f#file-my-error-L159
[06:45:03] tagrudev: has joined #RubyOnRails
[06:45:19] privacyid01: thanks for your help krz sevenseacat
[06:45:31] krz: privacyid01: pass in the CSRF token as a header
[06:45:40] MartinElvar: has joined #RubyOnRails
[06:46:14] kp666: has joined #RubyOnRails
[06:47:27] privacyid01: a quick google tell me to disble csrf protect_from_forgery with: :null_session
[06:47:43] krz: try curl -v -H "Accept: application/json" -H "Content-type: application/json" -H X-CSRF-TOKEN: "whatevertoken" -X POST -d ' {"user":{"username":"alvian","title":"makanan","text":"asdqwerzxc"}}' http://localhost:3000/users
[06:48:41] privacyid01: so do I just need to put any token? or I must generate it?
[06:48:54] arup_r: has joined #RubyOnRails
[06:49:50] krz: privacyid01: https://gist.github.com/cedbb832975c176d5ff2 for something more verbose
[06:50:31] krz: privacyid01: your csrf token would have been generated for you by rails
[06:50:46] krz: privacyid01: is your rails application only an API? i.e. no views?
[06:51:06] privacyid01: but I don't know how to get the csrf token
[06:51:21] krz: SPA=single page application
[06:51:47] bruno-: has joined #RubyOnRails
[06:52:13] krz: are your views jbuilder or erb?
[06:52:16] privacyid01: not an SPA it have full crud I use scaffolding to create my model
[06:52:45] krz: am curious, what are you using to connect to your api? backbone, angular, ember, other?
[06:53:13] privacyid01: ok let's make it clear,
[06:53:19] rvanlieshout: you should just disable csrf for your api requests imo
[06:53:41] privacyid01: so I create a new rails app jst for test json post/get
[06:53:46] krz: in ember, we inject the csrf token into the markup via <meta name='csrf-token' content='#{form_authenticity_token}'>
[06:54:12] krz: when ember does a put/post/delete request it picks up the token and passes it as a header, in the request
[06:54:24] privacyid01: http://api.rubyonrails.org/classes/ActionController/RequestForgeryProtection.html
[06:54:35] raunicolae: has joined #RubyOnRails
[06:54:37] rvanlieshout: krz: also a nice solution
[06:54:41] privacyid01: ok i think i will just disable it or just follow that links
[06:54:52] krz: you might want to think twice about disabling though
[06:55:04] rvanlieshout: that all depends on who is going to use that api
[06:55:07] krz: form_authenticity_token in a view, would render your csrf token btw
[06:55:41] krz: +1 rvanlieshout
[06:56:28] privacyid01: yeah in view it generate it's csrf token,
[06:56:55] privacyid01: but I don't know how to generate it if i want to use curl, the user of api is my android application btw
[06:58:12] mikajo: has joined #RubyOnRails
[07:00:28] Miron_: has joined #RubyOnRails
[07:00:48] krz: privacyid01: this might shed some light on disabling it http://stackoverflow.com/a/10343708/501171
[07:01:40] MartinElvar: has joined #RubyOnRails
[07:02:00] hotpancakes: has joined #RubyOnRails
[07:02:34] krz: the general consensus. if you are not using cookies/sessions to keep track of the current session. you could disable csrf all together. which means your api does authentication token, oauth based or other
[07:02:49] riffraff: has joined #RubyOnRails
[07:03:48] krz: the suggestion i was making about injecting the csrf token is somewhat explained in more detail here http://stackoverflow.com/questions/7203304/warning-cant-verify-csrf-token-authenticity-rails
[07:04:22] krz: but your use case (i.e. android application) is different. i dont think your android application has any access to any of your views
[07:04:53] krz: which makes it impossible to retrieve the csrf token, injected into the markup
[07:05:03] pawnbox: has joined #RubyOnRails
[07:05:47] tvw: has joined #RubyOnRails
[07:06:17] MaDErroR123: has joined #RubyOnRails
[07:06:40] privacyid01: ok then maybe I just disable it not anyone know my application url anyway
[07:07:38] artto: has joined #RubyOnRails
[07:09:16] MaDErroR123: has joined #RubyOnRails
[07:09:20] privacyid01: It's solved now here is my reference skip_before_action :verify_authenticity_token
[07:09:20] privacyid01: http://api.rubyonrails.org/classes/ActionController/RequestForgeryProtection.html
[07:09:35] privacyid01: thank you for your help all
[07:10:50] tlarevo: has joined #RubyOnRails
[07:11:30] raenk: has joined #RubyOnRails
[07:11:52] krz: privacyid01: well not knowing your url isnt going to guarantee security
[07:12:11] krz: as rvanlieshout mentioned. be weary about disabling csrf
[07:12:50] blackmes1: has joined #RubyOnRails
[07:15:49] annlewis: has joined #RubyOnRails
[07:16:22] startupality: has joined #RubyOnRails
[07:16:37] dhjondoh: has joined #RubyOnRails
[07:17:12] Pazician: has joined #RubyOnRails
[07:17:28] matt_d: has joined #RubyOnRails
[07:18:20] tris: has joined #RubyOnRails
[07:19:48] yogeshrt: has joined #RubyOnRails
[07:21:22] lorn: has joined #RubyOnRails
[07:21:39] lorn: has joined #RubyOnRails
[07:21:49] timnovins: has joined #RubyOnRails
[07:23:34] krzkrz: has joined #RubyOnRails
[07:23:54] dustinm`_: has joined #RubyOnRails
[07:26:08] bodie__: has joined #RubyOnRails
[07:26:13] SanguineAnomaly: has joined #RubyOnRails
[07:26:49] hotpancakes: has joined #RubyOnRails
[07:27:07] drupald: has joined #RubyOnRails
[07:27:35] relix: has joined #RubyOnRails
[07:27:51] pawnbox: has joined #RubyOnRails
[07:28:18] pawnbox: has joined #RubyOnRails
[07:28:26] jas02: has joined #RubyOnRails
[07:28:40] erichmenge: has joined #RubyOnRails
[07:29:13] ur5us: has joined #RubyOnRails
[07:31:39] moeabdol: has joined #RubyOnRails
[07:34:03] oscarb92: has joined #RubyOnRails
[07:36:43] oscarb92: hello, how can I group an ActiveRecord result ignoring the differents ids of the records?
[07:37:21] rvanlieshout: oscarb92: .group ?
[07:37:27] tlarevo: has joined #RubyOnRails
[07:37:29] rvanlieshout: or what do you want to group with what purpose?
[07:38:54] jgt1: has joined #RubyOnRails
[07:39:09] bmalum: has joined #RubyOnRails
[07:40:01] oscarb92: objects made at the same time by a user, I want to show them in a table as a single element (those with the same attributes but the ids should become a single row)
[07:40:10] oscarb92: ravnlieshout
[07:40:26] rvanlieshout: could you be a bit more specific?
[07:40:33] rvanlieshout: what object? what attributes would be considered the same
[07:40:38] rvanlieshout: and what row output would you want
[07:41:14] rgtk: has joined #RubyOnRails
[07:41:46] emilkarl: has joined #RubyOnRails
[07:43:26] oscarb92: https://gist.github.com/OscarBastardo/c9ed83a3c1e4d5d90d8c
[07:43:30] oscarb92: ravnlieshout
[07:44:27] baweaver: has joined #RubyOnRails
[07:46:32] rvanlieshout: oscarb92: ..?
[07:47:11] gambl0re: has joined #RubyOnRails
[07:47:36] TheNet: has joined #RubyOnRails
[07:47:56] Spami_: has joined #RubyOnRails
[07:48:12] sdwrage: has joined #RubyOnRails
[07:48:40] rgtk: has joined #RubyOnRails
[07:49:33] oscarb92: ravnlieshout a medico should be able to make a @reprogramacion_cita, but they are also related to many patients, so I made a table to store a reprogramacion made by a single doctor to many pacientes through an appointment
[07:49:50] htmldrum: has joined #RubyOnRails
[07:50:44] blackmes1: has joined #RubyOnRails
[07:50:46] rvanlieshout: and how does that answer what you want to group?
[07:50:57] rvanlieshout: oscarb92: are you able to get the list you want using plain sql?
[07:51:18] dideler: has joined #RubyOnRails
[07:51:19] oscarb92: ravnlieshout there is a column for each reprogramacion for each patient through appointments
[07:51:41] hotpancakes: has joined #RubyOnRails
[07:52:08] oscarb92: i want to group the patientes reprogramados at the same time as a single row
[07:52:25] oscarb92: havent tried to use plain sql
[07:52:33] bruno-: has joined #RubyOnRails
[07:52:35] oscarb92: I think I should consider it now
[07:52:51] rvanlieshout: well.. only because i've got no clue about what you want to group yet
[07:52:56] rvanlieshout: what attributes should be grouped based on what
[07:55:12] pawnbox: has joined #RubyOnRails
[07:55:13] kies: has joined #RubyOnRails
[07:58:20] oscarb92: https://gist.github.com/OscarBastardo/c9ed83a3c1e4d5d90d8c#file-schema-rb
[07:58:35] AzaToth: has joined #RubyOnRails
[07:58:46] norc: has joined #RubyOnRails
[07:59:12] norc: Hi. I have some tables with a few hundred million rows.
[07:59:54] oscarb92: chech at the table at the schema.rb rvanlieshout, for a group of dates the attributes will be the same except for the id
[07:59:59] moeabdol: has joined #RubyOnRails
[08:00:03] norc: On some of these I need pagination. Is there some gem that provides some "fuzzy" pagination using statistics rather than count(*) for number of pages?
[08:00:12] krzkrz: oscarb92: you are trying to group by date? day/month?
[08:00:19] norc: Or should I just roll my own here
[08:00:36] rvanlieshout: norc: there is absolutly nothing sane to say about an arbritary table with an arbritary amount of rows
[08:00:45] krzkrz: oscarb92: which one?
[08:00:55] krzkrz: what kind of date are you trying to group by?
[08:01:21] norc: rvanlieshout: My issue is that will_paginate uses a simple count(*) which forces the database to scan the entire table, which is horribly slow.
[08:01:36] rvanlieshout: norc: that's what pagination should do
[08:01:44] rvanlieshout: cache that result if it's too slow
[08:02:14] oscarb92: krzkrz: fecha_hora_anterior
[08:02:26] krzkrz: group by which date format? day, month hour?
[08:04:47] krzkrz: oscarb92: try something like select("date_part('year', fecha_hora_anterior) AS year, date_part('month', fecha_hora_anterior) AS month, date_part('day', fecha_hora_anterior) AS day, date_part('hour', fecha_hora_anterior) AS hour").group("date_part('year', fecha_hora_anterior), date_part('month', fecha_hora_anterior), date_part('day', fecha_hora_anterior), date_part('hour',
[08:04:49] krzkrz: fecha_hora_anteriofecha_hora_anterior)") modify where appropriate
[08:05:06] krzkrz: that groups by year, mondy, day and hour
[08:05:07] DoubleMalt: has joined #RubyOnRails
[08:05:14] krzkrz: mondy=month
[08:05:34] renews: has joined #RubyOnRails
[08:05:56] voker57: has joined #RubyOnRails
[08:05:56] norc: rvanlieshout: I want live data on the first page.
[08:06:28] rvanlieshout: norc: and caching the total count prevents that?
[08:06:36] rvanlieshout: you can expire that cache if an entry is changed
[08:06:38] krzkrz: norc: invalidate the cache
[08:06:58] norc: rvanlieshout: Oh I thought you meant caching the whole partial
[08:06:59] Coldblackice: has joined #RubyOnRails
[08:07:23] norc: Well, I get insertions at a rate of a couple dozen per second. ;-)
[08:07:30] MartinElvar: has joined #RubyOnRails
[08:08:17] ynonp: has joined #RubyOnRails
[08:09:51] jgt1: has joined #RubyOnRails
[08:10:24] johnflux: has joined #RubyOnRails
[08:10:24] johnflux: has joined #RubyOnRails
[08:12:21] agoldboi: has joined #RubyOnRails
[08:12:53] kimegede: has joined #RubyOnRails
[08:14:00] solars: has joined #RubyOnRails
[08:14:13] lele: has joined #RubyOnRails
[08:16:50] annlewis: has joined #RubyOnRails
[08:17:40] artto: has joined #RubyOnRails
[08:18:12] kalusn: has joined #RubyOnRails
[08:18:21] Limix: has joined #RubyOnRails
[08:18:22] czerasz: has joined #RubyOnRails
[08:19:09] darutoko: has joined #RubyOnRails
[08:19:14] MaDErroR123: has joined #RubyOnRails
[08:20:14] atomical: has joined #RubyOnRails
[08:21:00] chridal: has joined #RubyOnRails
[08:21:05] skullcrasher: how can I model this kind of json http://pastie.org/10528261
[08:21:17] pawnbox: has joined #RubyOnRails
[08:21:33] skullcrasher: so that ruby can consume the json and build one/more models out of it
[08:21:33] krzkrz: skullcrasher: use a serializer
[08:21:45] krzkrz: jbuilder, AMS and a few others
[08:21:58] riotjones: has joined #RubyOnRails
[08:22:45] skullcrasher: krzkrz, well yes. What I would like to know about is more like this: The sourrounding json object should be 1 model, and the data array should contain other models
[08:23:19] Jasaka: has joined #RubyOnRails
[08:23:21] krzkrz: skullcrasher: yea you can structure your json response with a serializer
[08:23:22] cac: has joined #RubyOnRails
[08:23:30] kitsuneyo: has joined #RubyOnRails
[08:23:56] krzkrz: serializers will give you access to your models. from there you can do as you wish
[08:25:47] drale2k: has joined #RubyOnRails
[08:25:54] V9O: has joined #RubyOnRails
[08:26:35] krzkrz: norc: sounds like you need to rethink your architecture. you could invalidate cache on a time basis, say 10 minutes. use a push notification to update the existing page with new data
[08:26:49] krzkrz: but then you need to think about what happens when the user reloads the page a 2nd time
[08:27:46] krzkrz: maybe you can have the first page, load data from a redis server
[08:28:03] krzkrz: and let will_paginate/kaminari handle pagination on subsequent pages
[08:28:50] norc: This is the damn price I get for using an RDBMS with MVCC on a table that doesn't need it. :(
[08:29:05] krzkrz: if you are talking about millions of records being updated frequently. then you might want to consider your definition of "live"
[08:29:22] krzkrz: consider=reconsider
[08:29:28] roshanavand: has joined #RubyOnRails
[08:29:30] norc: krzkrz: Its just inserts and deletes though.
[08:29:47] norc: Which is why I am so sad.
[08:30:32] hotpancakes: has joined #RubyOnRails
[08:31:28] norc: krzkrz: Ah. This discussion actually helped me. The solution is so simple. :)
[08:32:12] navo: has joined #RubyOnRails
[08:34:22] kitsuneyo: has joined #RubyOnRails
[08:34:48] jsrn_: has joined #RubyOnRails
[08:35:14] krzkrz: Anyone know how I can get line 8 to work https://gist.github.com/d60aeaa548946befc4fb
[08:35:33] krzkrz: apparently find_by_sql doesnt accept a ? directive
[08:42:10] pawnbox_: has joined #RubyOnRails
[08:43:03] d34th4ck3r: has joined #RubyOnRails
[08:43:15] Fly80: has joined #RubyOnRails
[08:44:53] youngbaks: has joined #RubyOnRails
[08:45:04] rakm: has joined #RubyOnRails
[08:45:39] lipoqil: has joined #RubyOnRails
[08:45:54] rakm: has joined #RubyOnRails
[08:46:47] rakm: has joined #RubyOnRails
[08:46:57] udiudi: has joined #RubyOnRails
[08:47:32] yogeshrt: has joined #RubyOnRails
[08:48:20] cheeti: has joined #RubyOnRails
[08:49:02] sadaf2606: has joined #RubyOnRails
[08:49:23] cheeti: hi how to calculate bandwidth of a url using ROR?
[08:50:37] tbuehlmann: cheeti, URLs have a bandwidth?
[08:51:01] ddv: come on you know what he means tbuehlmann :p
[08:51:04] marr: has joined #RubyOnRails
[08:51:11] nfk|laptop: has joined #RubyOnRails
[08:51:47] tbuehlmann: I seriously don't
[08:52:32] ddv: he probably wants to monitor various statistics
[08:52:37] RegulationD: has joined #RubyOnRails
[08:52:58] rvanlieshout: whatever that means for an url :)
[08:53:29] jbrinkmusic: simple question: is "!value == value.nil?" ?
[08:53:35] bruno-: has joined #RubyOnRails
[08:53:49] rvanlieshout: jbrinkmusic: ?
[08:53:53] rvanlieshout: it's a string
[08:54:01] rvanlieshout: and !value is a boolean
[08:54:11] rvanlieshout: .nil? is true only when nil
[08:54:29] tbuehlmann: jbrinkmusic, that's not the same, no
[08:54:30] jbrinkmusic: rvanlieshout: if I'm testing whether I have a value in an array, is nil different to not having a value at all?
[08:54:46] rvanlieshout: nil is explicitly nil
[08:54:56] rvanlieshout: define 'not having a value'
[08:55:35] ddv: jbrinkmusic: why not using fetch?
[08:55:43] nettoweb: has joined #RubyOnRails
[08:55:45] rvanlieshout: what fetch? where?
[08:55:51] ddv: on array
[08:55:58] _lazarevsky: good morning all.. I'm sending an email using SES and I wanna store a token somehwere in the email.. somewhere where it won't be visible
[08:55:59] rvanlieshout: jbrinkmusic: explain what you're trying to do
[08:56:05] jbrinkmusic: rvanlieshout: basically I need to know if I have either "" or nil in the value
[08:56:08] rvanlieshout: _lazarevsky: not possible
[08:56:09] _lazarevsky: I was thinking of including it in a hidden field within the content of the email itselg
[08:56:13] rvanlieshout: jbrinkmusic: .blank?
[08:56:20] _lazarevsky: but I just wanted to check whether I can utilise some header parameter
[08:56:29] ddv: _lazarevsky: now I have to guess what SES is....
[08:56:40] _lazarevsky: ddv: Simple Email Service
[08:56:48] _lazarevsky: ddv: an emailing client.. that';s the the important bit here :0
[08:56:58] rvanlieshout: _lazarevsky: anything in an email is visible by check it's source
[08:58:29] _lazarevsky_: has joined #RubyOnRails
[08:58:35] _lazarevsky_: sorry got d/ced
[08:58:39] ddv: rvanlieshout: I guess he just wants to hide it
[08:58:41] jbrinkmusic: rvanlieshout: .blank? works perfectly, thanks
[08:58:41] _lazarevsky_: currently I'm including the token in the email subject
[08:58:55] rvanlieshout: _lazarevsky: when should that token be used?
[08:59:03] _lazarevsky_: it looks doggone ugly.. I just wanna put it somewhere where it's not visible on the screen
[08:59:10] _lazarevsky_: like a email header attribute
[08:59:23] ddv: you know what I will get back to work :)
[08:59:24] rvanlieshout: why include it at all if not used
[08:59:24] teclator: has joined #RubyOnRails
[08:59:35] _lazarevsky_: if no such argument exists then I'll just add it to a hidden field in the html (content of the email)
[08:59:39] _lazarevsky_: rvanlieshout: it is used on the backend
[08:59:47] _lazarevsky_: so we've rolled out this feature
[08:59:55] rvanlieshout: you want to get it back when they reply?
[09:00:06] _lazarevsky_: whereby users can reply to an email which shows rpojects for which the data has not been updated in more than a week
[09:00:09] _lazarevsky_: so the users can just reply to that email
[09:00:24] rvanlieshout: i doubt mail clients woud include the hidden fields of a html body on reply
[09:00:26] norc: jbrinkmusic: The answer to your question: no. Case in point: !false == false.nil?
[09:00:26] _lazarevsky_: and using SQS and SNS an endpoint is invoked in our app
[09:00:28] rvanlieshout: subject is the most safe solution
[09:00:32] rvanlieshout: so make a better token
[09:00:34] norc: Is false. ;-)
[09:01:02] _lazarevsky_: whereby we update the data on their behalf
[09:01:13] lasker85: has joined #RubyOnRails
[09:01:15] _lazarevsky_: now in the db I associate the project ids and the manager's handle with the given token
[09:01:19] blackmes1: has joined #RubyOnRails
[09:01:29] _lazarevsky_: so that when the endpoint is called, i exact the token from the email subject and update the appropriate projects
[09:01:37] MartinElvar: has joined #RubyOnRails
[09:01:40] _lazarevsky_: now my manager asked me to remove the token from the email subject cuz it looks ugly
[09:01:46] rvanlieshout: _lazarevsky_: make it look better
[09:01:59] _lazarevsky_: rvanlieshout: that's not what the task says.. :/
[09:01:59] rvanlieshout: and there is a reason why several other apps put in the subject :)
[09:01:59] jbrinkmusic: norc: thank you for clarifying... I achieved my goal with rvanlieshout's advice :)
[09:02:06] lasker85: I want to add a basic blog to my existing rails app. Any idea what my best options are?
[09:02:08] rvanlieshout: _lazarevsky_: you always follow your tasks blindly?
[09:02:09] _lazarevsky_: rvanlieshout: whats the reason?
[09:02:21] rvanlieshout: _lazarevsky_: because you want to get it back on reply..
[09:02:34] _lazarevsky_: rvanlieshout: ya but what if I add it to the end of the email
[09:02:36] rvanlieshout: and that's a certain way to get it back
[09:02:38] _lazarevsky_: my email is html anyway
[09:02:44] _lazarevsky_: so I can append a hidden field
[09:02:56] _lazarevsky_: but it would be a bit of a pain to have to parse the styring
[09:02:57] rvanlieshout: and would you really expect outlook to return that input tag?
[09:03:01] _lazarevsky_: and find the token value
[09:03:10] cheeti: tbuehlmann how to find bandwidth of a website?
[09:03:13] _lazarevsky_: rvanlieshout: i sure would :)
[09:03:25] _lazarevsky_: rvanlieshout: maybe a span with visibility:hidden or something
[09:03:36] rvanlieshout: cheeti: what's bandwith of a website?
[09:03:58] rvanlieshout: you should ask their hosting provider what their bandwith of the connection used by the machine the websited is hosted on has
[09:04:20] _lazarevsky_: rvanlieshout: I'll let you know whether it gets sent
[09:04:25] _lazarevsky_: rvanlieshout: trying out now
[09:04:41] rvanlieshout: _lazarevsky_: test that with all major mail clients and web based mail services
[09:05:07] _lazarevsky_: our clients only use outlook/Web based outlook
[09:05:08] Pupeno: has joined #RubyOnRails
[09:05:08] Pupeno: has joined #RubyOnRails
[09:05:20] _lazarevsky_: and the app can only be accessed from our work laptops which have a certain custom image of linux installed
[09:05:23] _lazarevsky_: and kerberos certificates
[09:05:34] _lazarevsky_: so it's a niche really.. don't have to support loads of clients
[09:05:37] atmosx: has joined #RubyOnRails
[09:06:07] chridal: has joined #RubyOnRails
[09:06:20] rvanlieshout: but still the world crappiest mail client :)
[09:06:21] dopie: does anyone suggest a video conferencing service other than tokbox?
[09:06:34] lasker85: Anyone able to discuss blog options with me?
[09:06:55] lasker85: Want to integrate a blog into my site.
[09:07:24] renews: has joined #RubyOnRails
[09:08:51] krzkrz: lasker85: use a blogging service like wordpress/ghost/etc and create a cname record
[09:09:09] hotpancakes: has joined #RubyOnRails
[09:09:11] krzkrz: save yourself the headache of managing a blog. focus on writing content
[09:09:11] cheeti: rvanlieshout web hosting bandwidth
[09:09:12] lasker85: What about jekyll or octopress?
[09:09:44] rvanlieshout: cheeti: for a physical machine you could expect 1gbps utp connection
[09:09:55] rvanlieshout: cheeti: but i doubt that's what you're looking for
[09:10:59] cheeti: rvanlieshout based on the website bandwidth i have send requests with site down
[09:11:16] rvanlieshout: cheeti: what is 'website bandwidth'
[09:11:20] rvanlieshout: there is no such thing
[09:12:00] rvanlieshout: and why not send notify that a site is down when it's down? how is that based on 'website bandwidth'?
[09:12:03] rvanlieshout: what it even means :)
[09:12:48] lasker85: krzkrz -- what do you think about jekyll or ocotopress?
[09:12:58] Cervajz: has joined #RubyOnRails
[09:13:26] d34th4ck3r: has joined #RubyOnRails
[09:13:50] kitsuneyo: is it better to put avatar images in the user model or an associated profile model?
[09:14:42] norc: kitsuneyo: Im a big fan of keeping models small and simple.
[09:14:42] _lazarevsky_: rvanlieshout: you were right yet again
[09:14:44] Cervajz_: has joined #RubyOnRails
[09:14:51] _lazarevsky_: rvanlieshout: the hidden input never got added lol
[09:14:57] solars: has joined #RubyOnRails
[09:15:23] kitsuneyo: norc, well i could have an avatar model, that'd be pretty simpe :)
[09:15:41] zpe: has joined #RubyOnRails
[09:15:54] TheNet: has joined #RubyOnRails
[09:16:14] artto: has joined #RubyOnRails
[09:16:23] norc: kitsuneyo: Indeed. paperclip is a common utility gem that can assist you there by the way.
[09:16:43] norc: That can put it directly into user, without bloating the rest.
[09:16:45] dopie: has joined #RubyOnRails
[09:17:03] kramsee: has joined #RubyOnRails
[09:17:08] tjbiddle: has joined #RubyOnRails
[09:17:29] annlewis: has joined #RubyOnRails
[09:17:46] norc: kitsuneyo: If you have the need to add attributes to the pictures (tags, maybe timestamps), then it definitely should get its own model.
[09:18:11] kitsuneyo: yeah i guess you're right norc, i'm just looking at paperclip now
[09:18:46] sebstrax: has joined #RubyOnRails
[09:18:47] kitsuneyo: previously i used carrierwave
[09:19:31] mark3: has joined #RubyOnRails
[09:20:05] mark3: has joined #RubyOnRails
[09:20:59] lasker85: Anyone able to help me out with my blogging questions?
[09:21:08] lasker85: Want to integrate a blog into my site.
[09:21:42] rvanlieshout: lasker85: i've seen several options pass by in the last few min.. didn't read them?
[09:22:02] cheeti: rvanlieshout Bandwidth of the website is the actual amount of data transferred through the website at one time.
[09:22:16] rvanlieshout: cheeti: ah.. the rest of the world doesn't call that bandwidth
[09:22:29] lasker85: I saw a wordpress suggesstion
[09:22:31] rvanlieshout: but hey. besides that. and you want to know that from a ruby script?
[09:22:46] RegulationD: has joined #RubyOnRails
[09:22:58] cheeti: what is it cal can u tell me
[09:22:58] kp666_: has joined #RubyOnRails
[09:23:18] arup_r: has joined #RubyOnRails
[09:23:24] rvanlieshout: cheeti: and that should be including the images and stuff?
[09:24:15] rvanlieshout: cheeti: maybe something like http://stackoverflow.com/questions/19380281/check-remote-file-size-through-fetched-link-in-ruby helps
[09:25:13] tjbiddle: has joined #RubyOnRails
[09:25:31] cheeti: can u tell me the actual amount of data transferred through the website at one time. what is call
[09:25:43] rvanlieshout: there is no single call
[09:25:56] rvanlieshout: not unless you want to include images and stuff
[09:26:00] jbrinkmusic: has joined #RubyOnRails
[09:26:03] Balllkenende: has joined #RubyOnRails
[09:26:29] cheeti: rvanlieshout it's not call as a bandwith then what is it calls?
[09:26:38] abracadaniel: has joined #RubyOnRails
[09:26:47] rvanlieshout: cheeti: did you actually read that link i've just posted?
[09:27:04] cheeti: rvanlieshout ok i am seeing
[09:28:01] drale2k: has joined #RubyOnRails
[09:28:55] Axsuul: has joined #RubyOnRails
[09:30:19] webdestroya: has joined #RubyOnRails
[09:30:34] cheeti: rvanlieshout in that link calculating the size of a image i don't want that
[09:30:40] erbesharat: has joined #RubyOnRails
[09:30:46] solars: does rails 4.0.x work with the latest ruby version?
[09:31:06] rvanlieshout: cheeti: so you don't want to include the size of the images, stylesheets, js and stuff?
[09:31:27] helpa: solars: Why don't you try it and find out for yourself?
[09:31:33] rvanlieshout: rails 4.0 is not supported anymore
[09:31:55] chibs: has joined #RubyOnRails
[09:32:00] Peg-leg: has joined #RubyOnRails
[09:32:02] rodfersou: has joined #RubyOnRails
[09:32:09] cheeti: rvanlieshout https://www.greengeeks.com/kb/4065/how-much-web-hosting-bandwidth-do-i-need/
[09:32:41] op84: has joined #RubyOnRails
[09:32:50] rvanlieshout: cheeti: and you want to calculate that using ruby?
[09:32:54] rvanlieshout: then you'll need the size of the images too
[09:32:56] d34th4ck3r: has joined #RubyOnRails
[09:32:57] rvanlieshout: and the visitor count
[09:33:39] hotpancakes: has joined #RubyOnRails
[09:33:43] op84: hi! is there any chance to access params in default_url_options defined as class method?
[09:33:44] beauby: has joined #RubyOnRails
[09:33:59] rvanlieshout: oh. default url_options
[09:34:06] rvanlieshout: you can access the Rails.config stuff
[09:34:11] rhizome: my xy sense is tingling
[09:34:42] op84: rvanlieshout: hm where is params defined?
[09:34:51] elton: has joined #RubyOnRails
[09:34:51] solars: rvalnlieshout, well this is an irc channel for rails questions, I'm askin because I wanted to know if anybody tried it yet :)
[09:34:57] rvanlieshout: op84: oh wait. didn't read it right
[09:35:00] rvanlieshout: you cannot access params in a class method
[09:35:12] rvanlieshout: cause their are none in that context
[09:35:29] op84: rvanlieshout: shit ok thanks for help
[09:35:45] srinidhi: has joined #RubyOnRails
[09:35:53] rvanlieshout: op84: the question here is why?
[09:36:06] rvanlieshout: cause the fact that there are none in this context kinda means you don't get the context right
[09:36:21] cheeti: rvanlieshout i want to calculate how much bandwidth website have per day based on page size*visitors count*page count
[09:36:34] rvanlieshout: cheeti: then you'll have to include images
[09:37:04] rvanlieshout: and css, js and other things that are downloaded by the browser
[09:37:10] DEA7TH: has joined #RubyOnRails
[09:37:19] norc: cheeti: In my experience it's best to just start running and take live measurements.
[09:37:34] op84: rvanlieshout: i???m using devise for auth??? thats all good so far but i need to pass a locale param and some logic (which uses params).. and devise relies on using default_url_options as class method
[09:37:38] rhizome: webservers typically log that kind of thing, and it's easier to run log analysis there rather than building something for rails.
[09:38:35] rvanlieshout: op84: then you should fix that on a non-class-method base
[09:38:45] beauby_: has joined #RubyOnRails
[09:38:49] defsdoor: has joined #RubyOnRails
[09:39:57] tjbiddle: has joined #RubyOnRails
[09:39:58] op84: rvanlieshout: yeah sounds easy but dunno where to start :)
[09:40:01] DaniG2k: has joined #RubyOnRails
[09:40:25] rvanlieshout: op84: why does devise need a locale for auth?
[09:40:29] rvanlieshout: or what exactly is the problem
[09:40:34] rvanlieshout: when is this a problem
[09:42:55] op84: rvanlieshout: i do access /admin which when not logged in redirects to /users/login .. my regular page uses a locale prefix .. thats when the problem occures.. it should redirect to /en/users/login and with the self.default_url_options in ApplicationController passing the locale all is fixed but i need to pass other params thats the problem
[09:43:15] vigintas: has joined #RubyOnRails
[09:43:20] rvanlieshout: op84: isn't that redirection done in your own app controller?
[09:43:22] wpp: has joined #RubyOnRails
[09:43:55] op84: rvanlieshout: no not really i was searching for a way to override it
[09:44:11] rvanlieshout: iirc devise just raises an error
[09:44:16] rvanlieshout: and you redirect based on that in your app controller
[09:44:31] rvanlieshout: euh. no not devise
[09:44:34] rvanlieshout: devise doesn't check that
[09:44:37] rvanlieshout: pundit or cancan
[09:44:52] rvanlieshout: check your log to see what actually redirects
[09:45:18] kramsee: has joined #RubyOnRails
[09:45:44] pawnbox: has joined #RubyOnRails
[09:45:45] wpp: Hello! I'm having a situation where @node.update_attributes({ parent: "nonsense" }) could be submitted to a controller. Currently this raises RecordNotFound (nonsense cannot be found), is there a way to have it fail "silently" so I can return the error message in the response? I'd like to avoid rescue though. Thanks
[09:45:58] ibouvousaime: has joined #RubyOnRails
[09:46:03] tlarevo_: has joined #RubyOnRails
[09:46:25] op84: rvanlieshout: no devise is trying to build the redirect url which fails with missing locale??? i will check my logs thanks!
[09:46:41] kramsee: has joined #RubyOnRails
[09:46:53] kramsee: has joined #RubyOnRails
[09:47:44] op84: rvanlieshout: http://www.rubydoc.info/github/plataformatec/devise/Devise%2FFailureApp.default_url_options this is where it happens
[09:47:55] baweaver: has joined #RubyOnRails
[09:48:05] wpp: Ah I guess nvm this might not be a general case at all. I'm using the ancestry gem and it uses find (as oppossed to find_by or sth) in all cases.
[09:48:19] rvanlieshout: op84: and the trace to there?
[09:48:29] kramsee: has joined #RubyOnRails
[09:48:41] Pazician: has joined #RubyOnRails
[09:49:54] moeabdol: has joined #RubyOnRails
[09:50:17] op84: rvanlieshout: http://pastie.org/private/iqewvg7mghimsesqrhpcw
[09:51:28] rvanlieshout: you could create a route for that url and redirect again i suppose
[09:51:37] hotpancakes: has joined #RubyOnRails
[09:52:44] bitsapien: has joined #RubyOnRails
[09:52:44] cac: has joined #RubyOnRails
[09:52:49] chrislotix: has joined #RubyOnRails
[09:54:18] bruno-: has joined #RubyOnRails
[09:56:56] op84: rvanlieshout: hm yeah thought about that as well
[09:58:41] sdwrage: has joined #RubyOnRails
[09:59:36] Ergo: has joined #RubyOnRails
[10:00:13] d34th4ck3r: has joined #RubyOnRails
[10:02:33] _lazarevsky_: rvanlieshout: hey.. visibility:hidden did the trick!
[10:02:43] _lazarevsky_: so I added it into a span
[10:03:02] _lazarevsky_: <span style="visibility:hidden">test-value</span> <- this is a substring of a much bigger string. How can I return only this substyring? what would the XPATH look like?
[10:03:41] moeabdol: has joined #RubyOnRails
[10:03:46] rvanlieshout: _lazarevsky_: why not give it a id then?
[10:03:49] rvanlieshout: easier to find using xpath
[10:04:12] _lazarevsky_: rvanlieshout: the problem is that message.body return a messed up html
[10:04:31] _lazarevsky_: rvanlieshout: actually it's not only html but also some extra text, which I think is like.. the visual representation of the html
[10:04:36] _lazarevsky_: rvanlieshout: thus I can't parse it using nokogiri
[10:05:11] rvanlieshout: _lazarevsky_: regexp?
[10:05:25] krz: has joined #RubyOnRails
[10:05:29] _lazarevsky_: rvanlieshout: lemme look it up
[10:06:07] petricore: has joined #RubyOnRails
[10:06:33] xhoy: has joined #RubyOnRails
[10:06:59] xhoy_: has joined #RubyOnRails
[10:10:45] bonemind: has joined #RubyOnRails
[10:15:22] op84: rvanlieshout: what do you think of moving from devise to my own auth? the auth stuff i???m using is simple anyways..
[10:16:09] rvanlieshout: we use pundit + devise
[10:17:01] merlinp: has joined #RubyOnRails
[10:17:25] dionysus69: has joined #RubyOnRails
[10:17:47] gaussblurinc1: has joined #RubyOnRails
[10:18:06] annlewis: has joined #RubyOnRails
[10:19:01] op84: rvanlieshout: pundit looks good i will dig into it :) thanks for help!
[10:19:19] norc: _lazarevsky_: Nokogiri is the king for broken HTML. If not even it can parse it, you will have to insert some token attribute that you can scan for.
[10:19:49] _lazarevsky_: norc: I only want to find the span element
[10:19:53] _lazarevsky_: norc: there;s only ONE span element!
[10:20:18] norc: _lazarevsky_: Should be easy enough with a simple regex like rvanlieshout suggested then. :)
[10:20:42] yardenbar: has joined #RubyOnRails
[10:22:15] dionysus69: has joined #RubyOnRails
[10:22:47] riotjones: has joined #RubyOnRails
[10:23:50] _lazarevsky_: norc: umm.. what would it look like
[10:23:56] _lazarevsky_: cuz when I try and load the document
[10:23:57] xhoy: has joined #RubyOnRails
[10:24:03] _lazarevsky_: I only get a p element
[10:24:28] sameerynho: has joined #RubyOnRails
[10:24:32] xhoy_: has joined #RubyOnRails
[10:24:33] norc: Just match for the data with the closing span tag.
[10:25:35] yuujinlee: has joined #RubyOnRails
[10:25:55] Miron: has joined #RubyOnRails
[10:30:08] drale2k: has joined #RubyOnRails
[10:31:31] Miron_: has joined #RubyOnRails
[10:32:43] chibs: has joined #RubyOnRails
[10:36:01] elton: has joined #RubyOnRails
[10:36:53] op84_: has joined #RubyOnRails
[10:41:00] MartinElvar: has joined #RubyOnRails
[10:43:39] ynonp: has joined #RubyOnRails
[10:44:07] nfk|laptop: has joined #RubyOnRails
[10:44:21] ldnunes: has joined #RubyOnRails
[10:46:01] TheNet: has joined #RubyOnRails
[10:46:06] hotpancakes: has joined #RubyOnRails
[10:48:21] RailsNewbie: has joined #RubyOnRails
[10:48:59] baweaver: has joined #RubyOnRails
[10:49:21] mikecmpbll: has joined #RubyOnRails
[10:50:36] toomus: has joined #RubyOnRails
[10:50:48] new2ruby: has joined #RubyOnRails
[10:51:33] wethu: has joined #RubyOnRails
[10:51:43] lasker85: has joined #RubyOnRails
[10:53:04] toomus: How to prevent before_save infinite loop?
[10:54:56] ddv: toomus: not causing an infinite loop
[10:56:20] n1ck7: has joined #RubyOnRails
[10:57:36] suchness: has joined #RubyOnRails
[10:58:13] toomus: ddv: I want to make something like this http://pastie.org/10528590
[10:58:22] solars: anyone know what this means? mysql2 is in there activerecord-4.1.13/lib/active_record/connection_adapters/connection_specification.rb:190:in `rescue in spec': Specified 'mysql2' for database adapter, but the gem is not loaded. Add `gem 'mysql2'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord). (Gem::LoadError
[10:58:33] rvanlieshout: solars: prove that mysql2 is there
[10:58:36] rvanlieshout: using bundle exec
[10:58:42] Hates_: toomus: don't call save in your before_save
[10:59:01] solars: rvanlieshout, how do you mean prove
[10:59:13] suchness: I have been using datamapper for the last... 6 years. I am used to being able to do something like User.all.comments to get all the comments of all the users. I am moving to ActiveRecord now, and don't see how to accomplish the same thing. It seems like I can only chain comments after one instance of User, like User.first.comments. Anyone know how I should be doing the ActiveRecord equivilent to User.all.comments?
[10:59:16] solars: rvanlieshout, the above is the output of bundle exec
[10:59:32] rvanlieshout: solars: !gist the Gemfile
[10:59:32] helpa: solars: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[10:59:37] rvanlieshout: solars: add 'bundle show mysql2'
[10:59:45] rvanlieshout: and restart your rails server
[11:00:51] solars: rvanlieshout, https://gist.github.com/solars/b56e9534ad8e09bc5cc1 I'm upgrading to 4.1
[11:00:59] toomus: Hates_: I know this is cause
[11:01:16] solars: rvanlieshout, rails server is not running, it's an rspec spec
[11:01:28] solars: rvanlieshout, /home/solars/.rvm/gems/ruby-2.2.3/gems/mysql2-0.4.1 output of show
[11:01:37] rvanlieshout: solars: https://github.com/rails/rails/issues/21544
[11:01:47] rvanlieshout: and, just some advice, comment your gemfile
[11:01:51] toomus: But how this should be done: save record if not exist
[11:01:58] rvanlieshout: why sould sucker_punch be restricted in getting updates?
[11:02:50] Hates_: toomus: well as you need the activity to be saved, you could try putting it in an after_save callback perhaps, then you wouldn't need to explicity save the record
[11:03:21] solars: rvanlieshout, I'm starting to clean up this project
[11:03:28] solars: I assume there was a dependency
[11:03:32] solars: that didn't work
[11:03:37] rvanlieshout: yeah. the comment should tell you that
[11:03:48] solars: :) exactly
[11:03:52] solars: it's not my project
[11:04:04] rvanlieshout: i see a lot of people just adding all kinds of version constraints to their Gemfile
[11:04:11] solars: thanks for the hint though, I'm downgrading mysql2
[11:04:21] solars: yeah, you're right of course
[11:05:09] solars: working now, thanks a lot
[11:05:16] solars: still some rails versions to go :)
[11:07:29] DEA7TH: has joined #RubyOnRails
[11:08:40] kitsuneyo: has joined #RubyOnRails
[11:08:47] bruno-: has joined #RubyOnRails
[11:09:13] Regulati_: has joined #RubyOnRails
[11:12:43] mcr-credil: has joined #RubyOnRails
[11:13:20] adre: has joined #RubyOnRails
[11:16:39] kitsuneyo: has joined #RubyOnRails
[11:16:40] stamina: has joined #RubyOnRails
[11:18:41] bonhoeffer: has joined #RubyOnRails
[11:18:50] Hates_: suchness: Wouldn't you just go Comments.all ?
[11:18:54] annlewis: has joined #RubyOnRails
[11:19:08] suchness: Hates_: It's just an example
[11:19:53] htmldrum: has joined #RubyOnRails
[11:20:22] hotpancakes: has joined #RubyOnRails
[11:20:44] symbole: has joined #RubyOnRails
[11:21:24] Hates_: suchness: Well if comments can belong to different models (polymorphic), then you would need to create a scope either on Comment or User to retrieve comments just for Users
[11:21:31] yogeshrt: has joined #RubyOnRails
[11:22:10] RichiH: has joined #RubyOnRails
[11:24:00] suchness: Hates_: the question isn't how to get the comments it's how to get a relationship from another collection like in datamapper
[11:24:04] suchness: looks like it's just
[11:24:16] suchness: Comment joined with user
[11:24:27] suchness: not as easy as datamapper but it will do
[11:25:09] lasker85: has joined #RubyOnRails
[11:25:17] Hates_: suchness: but why would you want to say User.all.comments? I'm not familiar with DataMapper so I don't understand what the difference is between that and Comments.all
[11:25:39] suchness: Hates_: User.all(:name => "bob").comments
[11:25:57] Hates_: suchness: ahhh that makes sene
[11:27:02] krz: has joined #RubyOnRails
[11:27:48] norc: Is there some neat upload gem that allows for storing the data in a BLOB column?
[11:27:55] pydave6367: has joined #RubyOnRails
[11:28:10] Spami: has joined #RubyOnRails
[11:28:19] Spami: I have this code https://gist.github.com/theonegri/45590c3857f5fb618e06 but when Im trying to run item.save! I'm getting Attempted to update a stale object: Item
[11:28:24] lxsameer_: has joined #RubyOnRails
[11:28:40] norc: Im using Oracle 11gr2, so whatever solution needs to play nicely with that. :)
[11:28:48] Spami: I don't understand why since I'm following the rails api http://api.rubyonrails.org/classes/ActiveRecord/Locking/Pessimistic.html
[11:28:51] Jasaka: has joined #RubyOnRails
[11:29:22] pawnbox: has joined #RubyOnRails
[11:29:22] apg: has joined #RubyOnRails
[11:30:58] drale2k: has joined #RubyOnRails
[11:31:13] lasker85: has joined #RubyOnRails
[11:31:17] jarray52: has left #RubyOnRails: ()
[11:31:26] Pazician: has joined #RubyOnRails
[11:31:54] sameerynho: has joined #RubyOnRails
[11:34:28] DylanJ: Spami: are you doing something in a callback?
[11:34:38] Spami: DylanJ, nope
[11:35:15] quazimodo: has joined #RubyOnRails
[11:35:39] bonhoeffer: has joined #RubyOnRails
[11:36:46] elton: has joined #RubyOnRails
[11:36:48] DylanJ: I dunno about that lock(true).find(xyz). I usually do Item.find(xyz).with_lock { // work }}
[11:37:22] norc: DylanJ: Same thing
[11:37:30] darrencauthon: has joined #RubyOnRails
[11:39:44] sonOfRa: has joined #RubyOnRails
[11:40:47] sonOfRa: has joined #RubyOnRails
[11:41:10] kitsuneyo: has joined #RubyOnRails
[11:41:32] Spami: DylanJ, like Item.find(params[:id]).with_lock do |item|
[11:41:43] Spami: btw my code is in a controller, can this be the issue?
[11:41:50] weckl: has joined #RubyOnRails
[11:43:36] DylanJ: Spami: item = Item.find(params[:id]); item.with_lock do { // }. but if norc is right it wont make a difference.
[11:44:36] kimegede: has joined #RubyOnRails
[11:44:45] Spami: yep, doesn't change
[11:46:44] kitsuneyo: what's the easiest way to set class="active" on a <li> element if it links to the current page? i.e. in a nav?
[11:47:12] blackmes1: has joined #RubyOnRails
[11:48:02] tbuehlmann: kitsuneyo, for some cases, this might be enough: http://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#method-i-current_page-3F
[11:49:43] kitsuneyo: tbuehlmann, thanks
[11:49:49] baweaver: has joined #RubyOnRails
[11:50:08] kitsuneyo: i don't see current_page?(user_path) there, does it support those kinds of paths do you know?
[11:50:24] Ropeney: has joined #RubyOnRails
[11:50:46] chills42: has joined #RubyOnRails
[11:51:19] tbuehlmann: user_path will be a string, right? then yes, supported
[11:52:50] krz: has joined #RubyOnRails
[11:53:44] rbex: has joined #RubyOnRails
[11:55:28] djellemah: has joined #RubyOnRails
[11:57:55] ynonp: has joined #RubyOnRails
[11:59:36] darrencauthon: has joined #RubyOnRails
[12:04:15] lacrymology: has joined #RubyOnRails
[12:04:33] syath: has joined #RubyOnRails
[12:05:02] antgel: has joined #RubyOnRails
[12:08:40] chrislotix: has joined #RubyOnRails
[12:14:47] ebbflowgo: has joined #RubyOnRails
[12:15:08] artto: has joined #RubyOnRails
[12:15:33] darrencauthon: has joined #RubyOnRails
[12:16:25] ebbflowgo: has joined #RubyOnRails
[12:19:50] annlewis: has joined #RubyOnRails
[12:22:03] ebbflowgo: has joined #RubyOnRails
[12:22:17] pontiki: has joined #RubyOnRails
[12:22:28] hotpancakes: has joined #RubyOnRails
[12:22:49] pontiki: has joined #RubyOnRails
[12:23:04] pontiki: has joined #RubyOnRails
[12:23:34] riotjones: has joined #RubyOnRails
[12:25:12] roshanavand: has joined #RubyOnRails
[12:26:32] bbrowning: has joined #RubyOnRails
[12:26:52] bonemind: has joined #RubyOnRails
[12:27:05] sami: has joined #RubyOnRails
[12:29:35] MartinEl_: has joined #RubyOnRails
[12:31:28] MartinEl_: has joined #RubyOnRails
[12:31:47] drale2k: has joined #RubyOnRails
[12:32:18] roshanavand: has joined #RubyOnRails
[12:32:58] darrenca_: has joined #RubyOnRails
[12:33:28] chibs: has joined #RubyOnRails
[12:34:15] bonhoeffer: has joined #RubyOnRails
[12:36:16] nhhagen: has joined #RubyOnRails
[12:36:51] bruno-: has joined #RubyOnRails
[12:37:03] DEA7TH: has joined #RubyOnRails
[12:37:26] elton: has joined #RubyOnRails
[12:37:38] arup_r: has joined #RubyOnRails
[12:39:06] hardtail: has joined #RubyOnRails
[12:39:14] krz: rvanlieshout: so if rails acts as a pure api (and with token based authentication). is protect_from_forgery with: :null_session fine? instead of protect_from_forgery with: :exception
[12:39:47] Spami: has joined #RubyOnRails
[12:39:55] CanTonic: has joined #RubyOnRails
[12:41:01] norc: krz: Sure. You will want your own authentication mechanism anyway.
[12:41:54] MartinElvar: has joined #RubyOnRails
[12:42:13] krz: norc: :thumbsup:
[12:42:38] hotpancakes: has joined #RubyOnRails
[12:43:11] krz: anyone know any decent request specs for API's i can use as a reference?
[12:43:22] krz: rspec request specs*
[12:44:54] yogeshrt: has joined #RubyOnRails
[12:46:03] norc: krz: https://www.relishapp.com/rspec/rspec-rails/docs/request-specs/request-spec
[12:46:12] norc: Should give you a good idea how to use them
[12:47:47] walidvb: has joined #RubyOnRails
[12:48:07] walidvb: hey all! i'm getting a "your ruby version is 2.1.4 but your Gemfile specified 2.1.5" error when i run bundle install
[12:48:26] walidvb: i do have rbenv installed, and rbenv version does list 2.1.5
[12:48:56] norc: walidvb: What does ruby -v say?
[12:50:35] darrenca_: has joined #RubyOnRails
[12:50:36] baweaver: has joined #RubyOnRails
[12:50:58] kitsuneyo: has joined #RubyOnRails
[12:50:59] DoubleMalt: has joined #RubyOnRails
[12:51:52] prasselpikachu_: has left #RubyOnRails: ()
[12:52:19] prasselpikachu: has joined #RubyOnRails
[12:52:25] norc: walidvb: In the same shell that you tried to run bundle install in?
[12:52:54] norc: walidvb: Try updating your bundler.
[12:53:09] walidvb: norc: thanks!
[12:56:32] symbole: has joined #RubyOnRails
[12:57:38] acti0nman: has joined #RubyOnRails
[12:57:54] norc: Any neat gem around that allows me to upload files directly into a database column using a BLOB?
[12:58:59] BradenBraden: has joined #RubyOnRails
[13:05:03] rvanlieshout: norc: there is no direct path from request to db
[13:05:49] norc: rvanlieshout: So I would need a full route + controller + action + the model meh. :(
[13:05:59] norc: Ill just use paperclip then
[13:06:10] rvanlieshout: norc: paperclip isn't going to change that
[13:06:19] rvanlieshout: you'll always need a route
[13:06:27] rvanlieshout: cause you have to map the request to a controller action
[13:06:33] norc: paperclip takes care of the magic for me at least
[13:06:46] MartinElvar: has joined #RubyOnRails
[13:07:41] raunicolae: has left #RubyOnRails: ("Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is")
[13:07:45] MartinElvar: has joined #RubyOnRails
[13:08:00] beauby: has joined #RubyOnRails
[13:14:06] shibabu: has joined #RubyOnRails
[13:17:06] jkamenik: has joined #RubyOnRails
[13:18:44] tuelz1: has joined #RubyOnRails
[13:19:42] singedEUNE: has joined #RubyOnRails
[13:19:56] blackmes1: has joined #RubyOnRails
[13:20:05] umdstu: has joined #RubyOnRails
[13:20:24] singedEUNE: has joined #RubyOnRails
[13:20:24] singedEUNE: has joined #RubyOnRails
[13:20:24] annlewis: has joined #RubyOnRails
[13:21:06] lacrymology: I've got this code, it's written by someone else. I understand most of it but I'd like to find the docs of what's actually going on here: what is respond_to, and why are the fields that are rendered by the format.json call rendered and not others http://dpaste.com/2C8JTBC
[13:21:07] umdstu: i can't seem to add the gems in vendor/cache to git. git add does nothing. git status doesn't show them. `vendor` isn't anywhere in .gitignore or global, what the heck?
[13:21:59] rvanlieshout: lacrymology: checked api.rubyonrails.org about respond_to ?
[13:22:02] umdstu: lacrymology: render is used to send that data, as opposed to letting rails automagically render the file of the same name with extension .format
[13:22:41] rvanlieshout: umdstu: why would you want them in vendor/cache?
[13:22:50] umdstu: rvanlieshout: for a deployment?
[13:22:59] hardtail: good morning everyone, have a good day
[13:23:08] lacrymology: umdstu: okay, but again, @alert is a list of models. How are the fields in the models selected?
[13:23:09] rvanlieshout: umdstu: you would normally install them again there
[13:23:13] MartinElvar: has joined #RubyOnRails
[13:23:15] lacrymology: which attributes are rendered?
[13:23:18] umdstu: rvanlieshout: no you don't
[13:23:24] lacrymology: I don't THINK it's all of them
[13:23:29] rvanlieshout: umdstu: yeah you do
[13:23:32] singedEUNE: has joined #RubyOnRails
[13:23:32] singedEUNE: has joined #RubyOnRails
[13:23:51] umdstu: rvanlieshout: read through this then let me know if you still think so: http://bundler.io/v1.10/deploying.html
[13:23:53] rvanlieshout: you can only copy vendor/cache IF your systems are really really similar
[13:24:13] rvanlieshout: umdstu: know that guide
[13:24:16] rvanlieshout: umdstu: doesn't change my opinion
[13:24:24] umdstu: rvanlieshout: you can copy it regardless, but only the ones that are ruby specific and need compiling are the same architecture will install
[13:24:44] krz: has joined #RubyOnRails
[13:24:47] rvanlieshout: i don't use bundle pack
[13:24:59] umdstu: regardless, it's there and it has a purpose
[13:25:11] umdstu: just because you don't use it doesn't mean it 'unusual'
[13:25:16] rvanlieshout: umdstu: yeah, that it won't use internet to fetch them
[13:25:19] rvanlieshout: it'll still install them again
[13:25:20] umdstu: right? :)
[13:25:30] rvanlieshout: so installing gems again remote is common
[13:25:47] umdstu: no one said anything about commit the gems means you dont have to install them
[13:25:50] rvanlieshout: but besides that
[13:25:51] sdwrage: has joined #RubyOnRails
[13:26:23] rvanlieshout: is it in gitignore?
[13:26:41] umdstu: nope, checked .gitignore and .gitignore-global
[13:26:52] rvanlieshout: and within vendor/cache?
[13:27:17] umdstu: checked, only have the one .gitignore in the project root
[13:27:17] rvanlieshout: git check-ignore -v vendor/cache/foo
[13:28:05] lacrymology: specifically, I'd like to add a field to the json: device: self.component.device
[13:28:44] umdstu: rvanlieshout: check-ignore returned nothing
[13:28:54] rvanlieshout: umdstu: and if you git add it directly? no output?
[13:29:05] KensoDev: has joined #RubyOnRails
[13:29:07] atomical: has joined #RubyOnRails
[13:29:27] umdstu: rvanlieshout: yep, silenty cries
[13:29:57] umdstu: git add vendor/cache/* does nothing
[13:30:21] MartinElvar: has joined #RubyOnRails
[13:30:29] rvanlieshout: .git/info/exclude
[13:30:42] rvanlieshout: or git add -f ?
[13:30:52] infamos: has joined #RubyOnRails
[13:30:59] nertzy: has joined #RubyOnRails
[13:32:06] umdstu: nothing in exclude
[13:32:27] umdstu: -f had no effect
[13:32:43] rvanlieshout: isn't it alreay added?
[13:33:48] umdstu: vendor is, because assets is, but no vendor/cache, which i just generated
[13:33:55] umdstu: i'll keep playing with it, ugh
[13:34:28] rvanlieshout: doesn't your server has the ability to download those gems itself?
[13:36:07] umdstu: nope, non internet connect and deploy to it through a proxy via capistrano
[13:36:17] User458764: has joined #RubyOnRails
[13:36:38] umdstu: hence the need for the bundle pack
[13:36:45] User458764: Hello, Does anybody knows a good site to serve images online for web development?
[13:36:48] umdstu: gotta pack those babies in
[13:37:20] mwlang: User458764: http://placehold.it/
[13:37:24] pontiki: User458764: your own images or placeholders?
[13:37:34] User458764: my own images :)
[13:37:55] User458764: pontiki thanks
[13:38:10] hotpancakes: has joined #RubyOnRails
[13:38:44] jas02: has joined #RubyOnRails
[13:41:28] User458764: s3 is a paid service I think, is there something free?
[13:41:46] bonhoeffer: has joined #RubyOnRails
[13:42:14] User458764: It is only for test purpose
[13:43:05] User458764: sevenseacat why?
[13:43:29] pontiki: for testing, just set up a VM that serves up the images
[13:44:21] singedEUNE: has joined #RubyOnRails
[13:44:21] singedEUNE: has joined #RubyOnRails
[13:47:06] mikezaby_: has joined #RubyOnRails
[13:48:35] hotpancakes: has joined #RubyOnRails
[13:49:32] yogeshrt: has joined #RubyOnRails
[13:50:30] dhjondoh: has joined #RubyOnRails
[13:51:25] drale2k: has joined #RubyOnRails
[13:52:46] rgtk: has joined #RubyOnRails
[13:52:57] Spami: Anyone knows what is going on here: http://stackoverflow.com/questions/33521306/pessimistic-locking-fails ?
[13:53:05] rgtk: has joined #RubyOnRails
[13:53:47] blackmes1: has joined #RubyOnRails
[13:54:06] SeanLazer: has joined #RubyOnRails
[13:56:15] dstarh: has joined #RubyOnRails
[14:00:11] mrchris: has joined #RubyOnRails
[14:00:17] drale2k: has joined #RubyOnRails
[14:01:02] dionysus69: has joined #RubyOnRails
[14:01:06] rgtk: has joined #RubyOnRails
[14:01:37] dionysus69: hello everyone long time no see
[14:03:34] mrchris: has joined #RubyOnRails
[14:05:16] chromium_: has joined #RubyOnRails
[14:05:28] annlewis: has joined #RubyOnRails
[14:06:46] chromium_: has left #RubyOnRails: ()
[14:08:22] mag42c: has joined #RubyOnRails
[14:10:04] Skelz0r: has joined #RubyOnRails
[14:10:16] frzng: has joined #RubyOnRails
[14:10:18] drbayer: has joined #RubyOnRails
[14:11:05] flowower: has joined #RubyOnRails
[14:13:06] maxz: has joined #RubyOnRails
[14:14:00] ramortegui: has joined #RubyOnRails
[14:15:02] joshkovach: has joined #RubyOnRails
[14:15:42] htmldrum: has joined #RubyOnRails
[14:17:05] sankaber: has joined #RubyOnRails
[14:18:07] matthewd: has joined #RubyOnRails
[14:19:05] centrx: has joined #RubyOnRails
[14:19:06] chibs: has joined #RubyOnRails
[14:19:22] The_Phoenix: has joined #RubyOnRails
[14:21:13] The_Phoenix: has joined #RubyOnRails
[14:21:13] smathy: has joined #RubyOnRails
[14:22:10] mrchris: has joined #RubyOnRails
[14:23:27] meraru: has joined #RubyOnRails
[14:24:11] meraru: has left #RubyOnRails: ()
[14:24:21] riotjones: has joined #RubyOnRails
[14:24:44] iongion: has joined #RubyOnRails
[14:24:48] iongion: has left #RubyOnRails: ()
[14:25:10] gion: has joined #RubyOnRails
[14:25:19] gion: I am using activesupport to convert a ruby hash to xml and I see it automatically singularize the names of arrays, can that be prevented ?
[14:25:20] Guest53: has joined #RubyOnRails
[14:25:32] nickenchuggets: has joined #RubyOnRails
[14:26:54] hotpancakes: has joined #RubyOnRails
[14:27:16] MartinElvar: has joined #RubyOnRails
[14:27:42] bonhoeffer: has joined #RubyOnRails
[14:28:00] sankaber: has joined #RubyOnRails
[14:29:29] damireh: has joined #RubyOnRails
[14:29:55] maxz: has joined #RubyOnRails
[14:31:51] infamos: has joined #RubyOnRails
[14:33:47] youngbaks: has joined #RubyOnRails
[14:34:02] build22: has joined #RubyOnRails
[14:34:17] umgrosscol: has joined #RubyOnRails
[14:36:10] dionysus69: has joined #RubyOnRails
[14:38:06] roshanavand: has joined #RubyOnRails
[14:38:11] bruno-: has joined #RubyOnRails
[14:38:38] Skelz0r: has joined #RubyOnRails
[14:40:00] elton: has joined #RubyOnRails
[14:40:58] hotpancakes: has joined #RubyOnRails
[14:41:25] MartinEl_: has joined #RubyOnRails
[14:43:23] bruno-_: has joined #RubyOnRails
[14:44:20] bonhoeffer: has joined #RubyOnRails
[14:45:47] atomical_: has joined #RubyOnRails
[14:46:02] shibabu: has joined #RubyOnRails
[14:48:37] bruno-_: has joined #RubyOnRails
[14:48:55] nhhagen: has joined #RubyOnRails
[14:52:16] arthurix: has joined #RubyOnRails
[14:53:35] bratsche: has joined #RubyOnRails
[14:54:09] ahegyi: has joined #RubyOnRails
[14:54:15] roshanavand: has joined #RubyOnRails
[14:55:20] Icey: has joined #RubyOnRails
[14:55:36] Icey: has joined #RubyOnRails
[14:56:44] blackmes1: has joined #RubyOnRails
[14:58:04] mosez: knows somebody why httparty makes 2 requests even if it should do only one? maybe it's related to digest auth?
[14:58:20] stannard: has joined #RubyOnRails
[14:58:33] polishdub: has joined #RubyOnRails
[14:59:55] mosez: hum, looks like that... if i remove the digest auth thing it requests only once.
[15:01:07] stannard: has joined #RubyOnRails
[15:01:43] darrencauthon: has joined #RubyOnRails
[15:01:45] bmalum: has joined #RubyOnRails
[15:02:06] darrencauthon: has joined #RubyOnRails
[15:03:27] HalcyonicStorm: has joined #RubyOnRails
[15:04:04] TheNet: has joined #RubyOnRails
[15:04:42] dionysus69: has joined #RubyOnRails
[15:06:14] annlewis: has joined #RubyOnRails
[15:06:58] The_Phoenix: has joined #RubyOnRails
[15:07:27] ritic: has joined #RubyOnRails
[15:08:02] hotpancakes: has joined #RubyOnRails
[15:08:58] The_Phoenix: has joined #RubyOnRails
[15:10:15] voker57: has joined #RubyOnRails
[15:10:35] Icey: has joined #RubyOnRails
[15:10:35] Icey: has joined #RubyOnRails
[15:10:38] adavia: has joined #RubyOnRails
[15:11:36] DiCablo: has joined #RubyOnRails
[15:11:55] hashpuppy: has joined #RubyOnRails
[15:11:58] mwlang: does anybody else feel like they keep reinventing the wheel with regards to generating a simple checkbox input on standard rails forms?
[15:12:15] mwlang: seems like I have to solve the whole checkbox input + label formatting every time.
[15:12:18] The_Phoenix: has joined #RubyOnRails
[15:12:57] arup_r: has joined #RubyOnRails
[15:13:56] arthurix_: has joined #RubyOnRails
[15:14:15] uris: has joined #RubyOnRails
[15:14:24] sankaber: has joined #RubyOnRails
[15:14:58] elaptics: mwlang: that's what simple_form was invented for
[15:15:04] ddv: mwlang: no we use bootstrap shizzel
[15:15:30] mwlang: hmmm???.bootstrap shizzel???
[15:16:29] lacrymology: what's the correct way to add some custom attributes to the json generated by a call to `render json: object`?
[15:17:03] mwlang: ACTION checks out simple_form
[15:17:22] dionysus69: has joined #RubyOnRails
[15:17:48] soahccc: mwlang: make your own form builder... it's not that hard and quite powerful :)
[15:18:00] kitsuneyo: has joined #RubyOnRails
[15:18:10] Hates_: lacrymology: if it's a model, you can override the as_json method
[15:18:22] The_Phoenix: has joined #RubyOnRails
[15:19:14] Hates_: lacrymology: or just call it directly with your options in your controller
[15:19:17] mwlang: elaptics: does simple_form do form_tags? I???m building a search query form, so there???s no AR object per se and all the examples are simple_form_for @user, etc.
[15:19:37] lacrymology: Hates_: I see that I can send a methods: [] parameter to as_json, can I pass those parameters to render instead?
[15:19:59] hotpancakes: has joined #RubyOnRails
[15:20:07] elaptics: mwlang: you can just do simple_form_for :user
[15:20:19] Hates_: lacrymology: no, you'll have to go say render json: object.as_json(...)
[15:20:49] lacrymology: okay, doesn't render do anything else that I'll be missing there?
[15:20:57] elaptics: mwlang: think of simple_form as just a superset of rails form helpers - as long as you started with the simple form form builder then you can mix and match the simple form and standard rails form helpers inside the block
[15:21:02] roshanavand: has joined #RubyOnRails
[15:21:09] Hates_: lacrymology: another way is you could use a builder template for your json
[15:21:32] elton: has joined #RubyOnRails
[15:21:33] elaptics: mwlang: I use simple_form to build my search queries - and just pass in the search object I've created
[15:21:41] Hates_: lacrymology: it just renders whatever json it's given
[15:21:42] elaptics: doesn't need to be an AR object
[15:21:56] mwlang: elaptics: I just had the idea to do just that!
[15:22:07] soahccc: mwlang: no idea how simple_form ends up but that's what you can get with own form builders :) http://files.sven.bmonkeys.net/images/bsformfor.png I wouldn't trade it in anymore (for backend stuff at least)
[15:22:21] mwlang: I was like, ???well, why not let an instantiated search object pre-populate the form accordingly?"
[15:23:10] mwlang: soahccc: it???s a good idea, for sure.
[15:23:47] mwlang: I???m leaning towards simple_form only because ???it???s there??? and thus well-tested by many others.
[15:24:04] mwlang: roll my own and I gotta deal with the debugging/testing effort myself.
[15:24:11] ddv: I find it funny that there is a many user in here
[15:24:18] tuelz1: has joined #RubyOnRails
[15:24:27] Balllkenende: has joined #RubyOnRails
[15:25:20] mwlang: ddv: I keep waiting on ???anyone??? to join the group so that when people come in and ask ???has anyone??????? we can get snarky replies automatically. :-)
[15:25:32] ddv: nice :p
[15:25:38] soahccc: mwlang: that's true but it's mostly to apply all the bootstrap classes... the whole builder is around 170 lines :)
[15:26:40] uris: has joined #RubyOnRails
[15:27:01] mordocai: has joined #RubyOnRails
[15:27:07] elaptics: fwiw simple_form has an option to set it up for bootstrap automatically
[15:27:07] mwlang: soahccc: care to gist that? :-D
[15:27:49] elaptics: mwlang: https://github.com/plataformatec/simple_form#bootstrap
[15:28:09] Pazician_: has joined #RubyOnRails
[15:28:27] soahccc: mwlang: here you go but it's a bit ... errr... dirty =) https://gist.github.com/2called-chaos/b5a882ccaffc55697dcd
[15:28:34] mwlang: elaptics: thanks
[15:28:34] dopamean_: has joined #RubyOnRails
[15:29:44] Limix: has joined #RubyOnRails
[15:29:58] chills42: has joined #RubyOnRails
[15:30:06] mwlang: soahccc: not too bad ??? I can learn from this quicker than googling all over the place.
[15:30:07] bruno-: has joined #RubyOnRails
[15:30:07] jkamenik1: has joined #RubyOnRails
[15:30:25] mary5030: has joined #RubyOnRails
[15:30:47] mwlang: nice use of define_method to auto-generate all the different input type methods
[15:30:56] soahccc: mwlang: and it has a few project specific things (it uses a few partials, has methods for jquery datetime selector stuff, etc.) which is the reason I like the custom builder over simple_form => easy to add specific stuff
[15:31:10] mary5030: has joined #RubyOnRails
[15:31:48] k1i: has joined #RubyOnRails
[15:31:48] euphoriaa: has joined #RubyOnRails
[15:31:49] axl_: has joined #RubyOnRails
[15:31:54] elaptics: soahccc: you can add custom inputs to simple_form too - it's very clean, you just add your own input classes as necessary
[15:31:58] euphoriaa: has joined #RubyOnRails
[15:31:58] euphoriaa: has joined #RubyOnRails
[15:32:03] Cervajz: has joined #RubyOnRails
[15:32:34] elaptics: soahccc: https://github.com/plataformatec/simple_form#custom-inputs
[15:32:36] yogeshrt: has joined #RubyOnRails
[15:32:47] kp666_: has joined #RubyOnRails
[15:33:08] skullcrasher: what could be the reason I get a "can't modify frozen String" in this line
[15:33:09] skullcrasher: @data = VehicleLatestDataRail.auth(@auth).find(:all, :params => {:sSearch => '', :displayStart => 12})
[15:33:12] elaptics: soahccc: plus you can create a custom form builder based on simple_form https://github.com/plataformatec/simple_form#custom-form-builder
[15:33:26] soahccc: elaptics: I know that it's possible. I used simple_form for a while but at some point it got tedious
[15:33:36] skullcrasher: the response is a valid json object
[15:33:53] elaptics: skullcrasher: the reason is that the string object has been frozen
[15:33:54] Cervajz_: has joined #RubyOnRails
[15:34:06] elaptics: now why it's been frozen is a different question entirely :)
[15:34:31] skullcrasher: does rails do this automatically on creating a model from activeResource?
[15:34:44] elaptics: no idea, never really used active resource
[15:35:00] pyemkey: has joined #RubyOnRails
[15:35:53] antgel: has joined #RubyOnRails
[15:36:24] treehug88: has joined #RubyOnRails
[15:36:33] drale2k: has joined #RubyOnRails
[15:37:42] pwnd_nsfw: has joined #RubyOnRails
[15:38:07] kies^: has joined #RubyOnRails
[15:38:38] mary5030: has joined #RubyOnRails
[15:40:11] soahccc: mwlang: btw the nifty method generation and all that jazz was heavily "inspired" aka. copied from a pro railscast ;) http://railscasts.com/episodes/311-form-builders
[15:40:43] cswelin: has joined #RubyOnRails
[15:42:35] brt: has joined #RubyOnRails
[15:42:48] mwlang: soahccc: I haven???t seen a rails cast in years ??? kind of surprised he???s still producing.
[15:43:05] soahccc: mwlang: he isn't I'm afraid the last one is from 2013 or so :(
[15:43:08] mwlang: ???or maybe not???.I still see his ???burnt out??? message.
[15:43:37] pyemkey: has joined #RubyOnRails
[15:43:47] soahccc: still useful though especially the more in-depth pro ones
[15:45:04] umgrosscol: has joined #RubyOnRails
[15:46:10] tenderlove: has joined #RubyOnRails
[15:47:07] m3_del: has joined #RubyOnRails
[15:49:03] pyemkey_: has joined #RubyOnRails
[15:49:35] User458764: has joined #RubyOnRails
[15:51:12] uris: has joined #RubyOnRails
[15:51:20] mary5030: has joined #RubyOnRails
[15:58:35] wilsonc91: has joined #RubyOnRails
[15:58:37] jahbrewski: has joined #RubyOnRails
[15:59:13] n1ck7: has joined #RubyOnRails
[15:59:44] Miron_: has joined #RubyOnRails
[16:00:17] beauby: has joined #RubyOnRails
[16:00:41] Bloomer: has joined #RubyOnRails
[16:01:49] krz: norc: was hoping for specific test cases for API's. i.e. what to test for
[16:02:14] bobbobbins: has joined #RubyOnRails
[16:02:59] simplyianm: has joined #RubyOnRails
[16:03:34] lacrymology: how do I add in a scope `where(field is not null)` or `where(field is null)`?
[16:03:59] lacrymology: my first guess would be where(field: nil) and where(field: :not_nil), but..
[16:04:05] roxtrongo: has joined #RubyOnRails
[16:04:06] lacrymology: can't find this in the query docs
[16:04:13] simplyianm: has joined #RubyOnRails
[16:04:43] qwertme: has joined #RubyOnRails
[16:04:45] smathy: lacrymology, first one is correct, http://devdocs.io/rails/activerecord/querymethods/wherechain#method-i-not for the second case.
[16:05:07] smathy: ...well reverse those depending on whether first/last applies to your question order or your "first guess" order.
[16:05:42] wldcordeiro: has joined #RubyOnRails
[16:05:58] roxtrongo: has joined #RubyOnRails
[16:06:05] yogeshrt: has joined #RubyOnRails
[16:07:02] annlewis: has joined #RubyOnRails
[16:08:23] Spami: smathy, could you take a look at this: http://stackoverflow.com/questions/33521306/pessimistic-locking-fails I'm struggling to find a solution
[16:10:23] arthurix: has joined #RubyOnRails
[16:12:41] cac: has joined #RubyOnRails
[16:12:51] arup_r: We don't have any method to add more option to a already existed column of a table.. Do we?
[16:12:53] smathy: Spami, lock_version is for optimistic locking, I'm guessing Rails is getting confused.
[16:12:59] uris: has joined #RubyOnRails
[16:13:15] arup_r: `change_column` will wipe out all the existing option.. it don't append
[16:13:23] lacrymology: smathy: thanks
[16:13:24] arup_r: it just rewrite
[16:13:32] shibabu: has joined #RubyOnRails
[16:13:33] smathy: lacrymology, you're welcome.
[16:13:33] arup_r: Are you with me ?
[16:13:53] smathy: arup_r, correct.
[16:14:02] arup_r: time to create a PR
[16:14:17] arup_r: to Rails ... but I am so dumb :(
[16:14:54] arup_r: it will be a nice feature request.. Like this http://apidock.com/rails/v4.2.1/ActiveRecord/ConnectionAdapters/SchemaStatements/add_index_options
[16:15:23] arup_r: add_column_options..
[16:15:27] jahbrewski: has joined #RubyOnRails
[16:15:42] arup_r: any place to submit a feature request only..? not the code.. hehe
[16:16:58] tubbo: arup_r: you mean like this? :P http://apidock.com/rails/v4.0.2/ActiveRecord/ConnectionAdapters/SchemaStatements/add_column_options%21
[16:17:29] arup_r: I skipped it
[16:17:33] tubbo: arup_r: looks like that was removed for some reason
[16:17:35] arup_r: someone made it..
[16:18:47] hotpancakes: has joined #RubyOnRails
[16:19:14] Spami: smathy, hum, I guess I'm missing something then
[16:19:22] Spami: I opened to rails console
[16:19:37] Spami: started to update an object with saving it
[16:19:46] smathy: arup_r, there's change_column_default and change_column_null if you want those. But using change_column you need to provide everything.
[16:19:54] chibs: has joined #RubyOnRails
[16:20:01] Spami: in the other one, I tried to update the same record and I did not get any error
[16:20:12] dionysus69: has joined #RubyOnRails
[16:21:05] arup_r: those 2 methods will help atleast in my case smathy .. I was looking for something direct.. anywat I will use those.
[16:23:29] Dreamer3: has joined #RubyOnRails
[16:24:18] Balllkenende: has joined #RubyOnRails
[16:25:04] Yomero2: has joined #RubyOnRails
[16:25:13] riotjones: has joined #RubyOnRails
[16:25:53] smathy: Spami, you probably did it wrong.
[16:26:16] arup_r: I need to re write those options. as I don't have any method to add null: false while using change_column https://gist.github.com/aruprakshit/245b7f965a2995ed3b59
[16:26:16] Spami: smathy, how can I test it/
[16:28:16] arup_r: If someone use `change_column_default`, do we really need to use `change_column_null`, because I think it is auto applicable
[16:29:45] arup_r: yes, we use of both makes sense.. there is difference between them.. I read it now
[16:30:06] smathy: Spami, easiest is in one console, Foo.transaction { f = Foo.lock.last; sleep 10 } then in your other console try Foo.lock.last and it will block until the sleep finishes and transaction exits.
[16:30:34] Dreamer3: has joined #RubyOnRails
[16:30:36] ritic: has joined #RubyOnRails
[16:31:20] disgrntld: has joined #RubyOnRails
[16:34:27] Cache_Money: has joined #RubyOnRails
[16:35:46] asianMike: has joined #RubyOnRails
[16:35:47] ritic: has left #RubyOnRails: ()
[16:36:42] richipargo: has joined #RubyOnRails
[16:37:12] pawnbox: has joined #RubyOnRails
[16:37:15] h7br1x: has joined #RubyOnRails
[16:38:13] roshanavand: has joined #RubyOnRails
[16:38:55] drale2k: has joined #RubyOnRails
[16:38:59] freezevee: has joined #RubyOnRails
[16:42:16] AntiSpamMeta: has joined #RubyOnRails
[16:43:39] blokc: has joined #RubyOnRails
[16:44:00] Detch: has joined #RubyOnRails
[16:44:00] xhoy: has joined #RubyOnRails
[16:44:50] xhoy_: has joined #RubyOnRails
[16:44:51] blokc: I have an integration test that requires a clean database, but fixtures from earlier run unit tests seem to stick around. How do I limit fixture usage to a single test?
[16:45:34] epochwolf: has joined #RubyOnRails
[16:45:45] willardg: has joined #RubyOnRails
[16:46:29] jahbrewski: has joined #RubyOnRails
[16:46:39] pwnd_nsfw: blokc, database_cleaner maybe
[16:46:56] blokc: that's a separate gem right?
[16:47:32] pawnbox: has joined #RubyOnRails
[16:48:17] brendan-: has joined #RubyOnRails
[16:50:11] SteenJobs: has joined #RubyOnRails
[16:50:39] nickenchuggets: I'm thinking about dumping angularjs
[16:51:12] slash_nick: nickenchuggets: rough... how long have you two been dating?
[16:51:30] hotpanca_: has joined #RubyOnRails
[16:51:30] Limix: has joined #RubyOnRails
[16:51:44] EminenceHC: has joined #RubyOnRails
[16:52:08] rboyd__: has joined #RubyOnRails
[16:52:48] nickenchuggets: I'm having trouble finding answers to problems with AngularJS
[16:52:55] nickenchuggets: so I'm just like... "ehhh... what else can I use"
[16:53:10] Yomero3: has joined #RubyOnRails
[16:53:57] rboyd__: has left #RubyOnRails: ()
[16:54:58] rboyd: has joined #RubyOnRails
[16:55:02] tuelz1: you could always just not do SPA and reconsider using websockets and various strategies to make your app performanet in all the right ways
[16:55:23] nickenchuggets: that sounds like a good idea
[16:55:46] hotpancakes: has joined #RubyOnRails
[16:56:15] tuelz1: I think facebook is a great example of how users don't really care about loading performance as long as you make them feel good about waiting. I really like how they draw fake post outline looking things while you're waiting for your data
[16:56:18] constantinexvi: has joined #RubyOnRails
[16:56:52] tuelz1: that way you don't break your viewing flow of checking out all the surroundings and orienting yourself with the page overview and by the time you're done, hopefully the data is there to digest
[16:56:59] pontiki: it's why advertising works ;)
[16:57:04] pawnbox: has joined #RubyOnRails
[16:57:18] pontiki: and muzak in elevators
[16:57:29] nickenchuggets: I'm totally sick of AngularJS
[16:57:35] nickenchuggets: I think it sucks
[16:57:49] pontiki: i was beginning to think so as well, nickenchuggets
[16:58:05] nickenchuggets: feels like overkill
[16:58:07] pontiki: i finally went to a class where someone actually made it make sense
[16:58:08] adam12: nickenchuggets: There was a great article on Medium about using Turbolinks to get an SPA feel without complexity.
[16:58:20] pontiki: not that i can regurgitate it at will
[16:58:31] pontiki: link, adam12 ?
[16:58:35] tuelz1: SPA's create too many problems when imho simple UI strategies and websockets cover 99.99% of the use cases for giving your users that experience without losing all the many many benefits of having one source of truth on your backend
[16:58:38] adam12: Trying to find it
[16:58:54] adam12: https://medium.com/@cblavier/rails-with-no-js-framework-26d2d1646cd
[16:59:40] pontiki: i'd be willing to say SPAs have a place in the grand scheme of things, but it's not *the* answer (note, there is no *the* answer)
[17:00:02] Balllkenende: has joined #RubyOnRails
[17:00:07] harishreddy: has joined #RubyOnRails
[17:00:14] fields: has joined #RubyOnRails
[17:00:15] pontiki: oh, man, i really want to know where that library is
[17:00:21] pontiki: or book store if that's what it is
[17:00:27] pontiki: that is *gorgeous*
[17:00:29] towski_: has joined #RubyOnRails
[17:01:56] renews: has joined #RubyOnRails
[17:02:09] nickenchuggets: guh... coffeescript...
[17:02:15] adam12: Yeah, I know
[17:02:20] constantinexvi: has joined #RubyOnRails
[17:02:22] adam12: I wonder if you could use sprockets-es6
[17:02:26] adam12: or sugarjs, or something.
[17:02:37] adam12: or plain JS.
[17:02:55] adam12: I just like the premise, with cleanup hooks, etc.
[17:03:51] cornerma1: has joined #RubyOnRails
[17:04:00] pontiki: yeah, it's good
[17:04:14] tuelz1: I'm a fan of coffeescript, I've never understood the hate for it. Best reason I've come across is it's hard to debug, which I've always wondered who thought JS was ever easy to debug :p
[17:04:28] adam12: It would be better on Rails if it had sourcemaps
[17:04:37] adam12: Probably the biggest complaint.
[17:05:15] tuelz1: list comprehensions are so much cleaner and make more sense to me anyways. Yes, I do want to run a function on this enumerable thing, rather than just writing a lot of boilerplate so I can look at each piece and maybe do something.
[17:05:19] troyready: has joined #RubyOnRails
[17:05:55] annlewis: has joined #RubyOnRails
[17:06:03] tuelz1: loops are just weird....obviously I want to do stuff to the data inside, so why am I writing code just so I can look at the data inside?
[17:06:11] User458764: has joined #RubyOnRails
[17:07:14] chridal: has joined #RubyOnRails
[17:08:37] Spami: smathy, hum I guess it's is not what I'm expecting. I was more looking for something that would fail queries on an object instead of waiting for the lock to be over and execute it
[17:09:56] chills42: has joined #RubyOnRails
[17:10:19] maxz: has joined #RubyOnRails
[17:11:01] peterhil: has joined #RubyOnRails
[17:11:12] bmalum: has joined #RubyOnRails
[17:11:23] rromanchuk: has joined #RubyOnRails
[17:11:57] momomomomo: has joined #RubyOnRails
[17:12:10] antgel: has joined #RubyOnRails
[17:12:24] smathy: Spami, if you're using PG then there's a NOWAIT option for locks.
[17:13:16] momomomomo: you'll get an error immediately if you can't get a lock immediately with nowait
[17:15:16] shibabu: has joined #RubyOnRails
[17:17:01] chills42: has joined #RubyOnRails
[17:17:51] slash_nick: nickenchuggets: not surprising, i hear most relationships end due to communication problems
[17:18:06] srinidhi: has joined #RubyOnRails
[17:18:07] elton: has joined #RubyOnRails
[17:18:25] jkamenik: has joined #RubyOnRails
[17:18:42] build22_: has joined #RubyOnRails
[17:18:43] armyriad: has joined #RubyOnRails
[17:23:03] tubbo: tuelz1: facebook is a slightly different problem than what you or most of us have. with facebook, they already know you're gonna log in. so making you wait an extra second for the page to load isn't as big of a deal. what *is* a big deal is keeping you on. facebook, if you noticed, basically spends all of its money and energy trying to make you stay on the site, because the more eyeballs per hour on
[17:23:05] tubbo: facebook.com, the higher they can charge for ads.
[17:23:12] safety_cut: has joined #RubyOnRails
[17:23:33] hotpancakes: has joined #RubyOnRails
[17:24:08] nickenchuggets__: has joined #RubyOnRails
[17:24:28] bricker: has joined #RubyOnRails
[17:25:05] tuelz1: tubbo: right, but the idea is the same...you stay on a webpage by making sure you give the users a comfortable experience along with other things
[17:25:34] tuelz1: I don't feel like it's any different than what we're trying to achieve with SPAs. We're just trying to make the thing the end users play with feel warm and fuzzy and right
[17:25:58] riotjones: has joined #RubyOnRails
[17:26:33] shapeshifter: has joined #RubyOnRails
[17:26:40] sebstrax: has joined #RubyOnRails
[17:26:52] tubbo: tuelz1: true. it depends on your use case. for example, a SPA as of now is not a great choice for ecommerce software. the reason being is because typically, people are linked to a product and they go right to the page, then check out. you don't want them to have to load a bunch of arbitrary code that they'll never use or see.
[17:27:03] SteenJobs: has joined #RubyOnRails
[17:27:11] darrencauthon: has joined #RubyOnRails
[17:27:13] Fire-Dragon-DoL: has joined #RubyOnRails
[17:27:52] yardenbar: has joined #RubyOnRails
[17:28:24] darrencauthon: has joined #RubyOnRails
[17:28:32] tubbo: but if you're making an admin panel or some sort of real-time dashboard, a long-living client-side application is most likely your best choice.
[17:28:47] AntiSpamMeta: has joined #RubyOnRails
[17:28:47] tubbo: basically, if you know your users are gonna be leaving the app open and expecting things to change, in some way.
[17:29:04] Aswebb_: has joined #RubyOnRails
[17:29:24] tubbo: nickenchuggets__: you can use javascript :P
[17:29:28] jahbrewski: has joined #RubyOnRails
[17:29:57] tubbo: frameworks are pretty useless for apps made by 1 developer imho
[17:30:00] tubbo: JS frameworks*
[17:30:02] tubbo: not rails :)
[17:30:09] tuelz1: tubbo: right, and websockets feel more right to me in the examples you're giving
[17:30:24] tuelz1: event listeners pushing data up to the client with no interaction from the end user
[17:30:25] tubbo: tuelz1: yeah that's what i was kinda getting to, i've been doing some experimentation in that line of thinking
[17:31:26] tubbo: my question is...when you do that, are you meant to do all your communications over WS? or should you basically use WS to send data, and then request the changes with an ajax request for the HTML?
[17:31:27] tuelz1: tubbo: yeah I think it REALLY makes sense if you start doing `non-destructive view logic` as in storing all the metadata with your rendered stuff in data attributes and stuff
[17:31:54] tubbo: tuelz1: oh great, i already do that :) semantic html ftw
[17:32:05] tuelz1: like if you have view logic that loops through @users, make sure the view has metadata that can tell how many users are there and attach uuids to them so you can go back with websockets and update easily
[17:32:11] smathy: PouchDB ftw
[17:32:14] tuelz1: tubbo: indeed.
[17:32:16] nertzy: has joined #RubyOnRails
[17:32:37] tubbo: i've always been a big fan of treating the markup as a document of structured data.
[17:32:57] Balllkenende: has joined #RubyOnRails
[17:33:33] dici: has joined #RubyOnRails
[17:33:35] tubbo: so my thought process here is that if you have your caching set up properly, and you structure your rails views in a certain way, you can render everything server-side and just be rendering small chunks of HTML that are most likely being read from a cache anyway
[17:33:49] kitsuneyo: has joined #RubyOnRails
[17:34:18] tubbo: but use websockets to basically transmit data changes, or maybe trigger ajax requests. say you're making Basecamp...like it would be cool if my client got a notification that some To-Do changed, so it tells my client app to re-fetch that data because it changed.
[17:34:37] tuelz1: yep, and if you have all the details on the front end that you need to make decisions, there is nothing stopping you from just pushing updates without knowing what the last request cycle looked like at all
[17:34:59] zeknox: has left #RubyOnRails: ()
[17:35:47] kitsuneyo: has joined #RubyOnRails
[17:37:05] chibs: has joined #RubyOnRails
[17:37:06] tuelz1: dumbed down example: a list of users connected to a chat - have an event listener on the back-end that when someone joins/leaves push up a uuid with join/leave metadata then on the client search the metadata already there and append/remove/do nothing depending on what needs to be done
[17:37:09] fields: has joined #RubyOnRails
[17:37:21] tuelz1: all the sudden you don't care if something bugged out and sent two join events/leave events w.e.
[17:37:35] tuelz1: because you have the metadata front and back
[17:37:35] Pupeno: has joined #RubyOnRails
[17:37:45] chridal: has joined #RubyOnRails
[17:38:02] tubbo: time to be real programmers :)
[17:38:17] tuelz1: tubbo: so you're going to lunch too :P
[17:39:03] _djbkd: has joined #RubyOnRails
[17:39:08] benlieb: has joined #RubyOnRails
[17:41:43] hotpancakes: has joined #RubyOnRails
[17:42:15] pyemkey: has joined #RubyOnRails
[17:43:31] shinnya: has joined #RubyOnRails
[17:43:58] hashpuppy: has joined #RubyOnRails
[17:44:16] bricker: today I have like 13 meetings
[17:44:21] bricker: now *that's* programming!
[17:44:29] Miron_: has joined #RubyOnRails
[17:44:38] tubbo: that veep life
[17:45:52] xardion: has joined #RubyOnRails
[17:46:00] fedexo: has joined #RubyOnRails
[17:46:26] tvw: has joined #RubyOnRails
[17:46:37] xardion: Looking for a good guide on creating a ruby gem that contains activerecord models and migrations that can be used with or without Rails
[17:47:21] baweaver: has joined #RubyOnRails
[17:47:26] TheNet: has joined #RubyOnRails
[17:48:51] pontiki: write one when you get done, please? :)
[17:49:33] oded: has joined #RubyOnRails
[17:49:44] hmsimha_: has joined #RubyOnRails
[17:49:53] xardion: pontiki: heheh
[17:50:02] Cervajz: has joined #RubyOnRails
[17:50:21] chridal: has joined #RubyOnRails
[17:50:53] Limix: has joined #RubyOnRails
[17:51:12] tubbo: xardion: "with or without"? that might be kinda difficult
[17:51:24] tubbo: oh wait, actually it's not *that* big of a deal :)
[17:51:55] tubbo: the models at least can be added in lib/your_gem and then included with ActiveSupport::Autoload
[17:52:06] tubbo: but not sure how you're gonna ship migrations to an app without generators of some kind
[17:52:39] cac: has joined #RubyOnRails
[17:52:54] mrtomme: has joined #RubyOnRails
[17:52:55] momomomomo_: has joined #RubyOnRails
[17:54:02] bonhoeffer: has joined #RubyOnRails
[17:54:33] Cervajz_: has joined #RubyOnRails
[17:55:16] apg: has joined #RubyOnRails
[17:55:21] lemur: has joined #RubyOnRails
[17:55:28] CanTonic: has joined #RubyOnRails
[17:55:49] Cervajz__: has joined #RubyOnRails
[17:55:54] Guest53: has joined #RubyOnRails
[17:56:03] arup_r: xardion: there is a book where write wrote about how to write Ruby gem
[17:56:57] bobbobbins: has joined #RubyOnRails
[17:58:12] Icey: has joined #RubyOnRails
[17:58:12] Icey: has joined #RubyOnRails
[17:59:09] cac: has joined #RubyOnRails
[18:02:24] mozzarella: has joined #RubyOnRails
[18:03:22] dionysus69: has joined #RubyOnRails
[18:04:04] mikecmpbll: has joined #RubyOnRails
[18:04:31] Balllkenende: has joined #RubyOnRails
[18:04:35] dionysus69: has joined #RubyOnRails
[18:04:36] rakm: has joined #RubyOnRails
[18:06:03] skullcrasher: I want to use an ActiveResource with find(:one), can I omit the :from => ... ?
[18:06:11] skullcrasher: like in: Person.find(:first, :from => :managers)
[18:06:35] xardion: tubbo: in my specific case, the non-Rails app doesn't need to run the migrations. But, the general idea would be to put in a task to run the migrations in a non-Rails app
[18:06:43] annlewis: has joined #RubyOnRails
[18:06:58] Guest53: has joined #RubyOnRails
[18:07:13] glennfu: has joined #RubyOnRails
[18:07:52] tubbo: xardion: not entirely sure how non-rails projects use migrations...does AR come with a Rake task and you just have to put the migrations into db/migrate? if so, your gem could ship with a Thor script that has an `init` command for setting up the migrations or whatever..
[18:08:13] SteenJobs: has joined #RubyOnRails
[18:08:21] tubbo: xardion: the rails integration could just execute that command on `rails generate xardions_hot_models:install`
[18:08:32] annlewis: has joined #RubyOnRails
[18:09:07] xardion: tubbo: right, like I said, I'm not that concerned about that aspect. What I want to know is what the current best practices are for putting AR models and migrations in a gem without making that gem Rails specific.
[18:09:29] glennfu: I was just reading some mentions of Turbolinks 5 here: https://github.com/rails/turbolinks/issues/628 . Some complaints about partial replacement being removed. Does anyone know if this is because it's simply not implemented yet, or is it really going away in favor of a different structure?
[18:09:30] xardion: I've googled this pretty extensively, and most of what I've found is pretty out-dated
[18:09:35] acti0nman: has joined #RubyOnRails
[18:10:06] Pazician: has joined #RubyOnRails
[18:10:19] tubbo: xardion: there really isn't any best practice for that, as it's not something that's done very often.
[18:10:24] smathy: skullcrasher, no problem with you asking, but just to explain why you might not get any (good) responses - no one really uses ActiveResource.
[18:10:38] PlasmaStar: has joined #RubyOnRails
[18:11:05] glennfu: skullcrasher: I joined late, but I use ActiveResource. Want to PM me your question?
[18:11:19] qejk: has joined #RubyOnRails
[18:11:22] bricker: xardion: Make a gem, add ActiveRecord as a dependency, write your classes
[18:11:24] tubbo: xardion: anything you read that's "out-dated" was probably written as a way to educate about a possible way of doing this, but by no means should be thought of as a "best practice", because shipping AR models outside of the Rails purview is not very common.
[18:11:31] chills42: has joined #RubyOnRails
[18:11:31] yogeshrt: has joined #RubyOnRails
[18:11:36] bricker: xardion: same as any other library
[18:12:17] tubbo: glennfu: did you read https://github.com/rails/turbolinks/issues/628#issuecomment-153131110?
[18:12:27] tubbo: "Turbolinks 5 is a complete rewrite and will be the version we'll be bundling with Rails 5."
[18:12:34] Balllkenende: has joined #RubyOnRails
[18:12:35] baweaver: has joined #RubyOnRails
[18:12:54] tubbo: TL3 has the progressBar and some other changes, but doesn't have the kind of controller-level support and partial DOM changes that TL5 should have
[18:13:00] glennfu: tubbo: yeah I got that, but I didn't know if that meant "we're rewriting and tossing out support for partial replacement" or "we're rewriting and not done yet"
[18:13:09] MrPunkin: has joined #RubyOnRails
[18:13:47] tubbo: glennfu: that's a good question. i'd say you might have to read the source of basecamp/turbolinks to get that answer..
[18:14:15] glennfu: tubbo: yeah I guess that's my last resort scenario :)
[18:14:23] glennfu: I've been trying to help get https://github.com/ssorallen/turbo-react working with Turbolinks 3
[18:14:38] glennfu: but from what I've gathered of new hooks in Turbolinks 5, it might solve some of my problems
[18:14:48] walidvb_: has joined #RubyOnRails
[18:14:57] glennfu: but if Turbolinks 5 is far from ready, I'm in a really awkward holding pattern when I'd love to get this thing working!
[18:15:17] elaptics: TL3 is so bad they skipped a version 4 and created 5?
[18:15:55] glennfu: elaptics: haha maybe! I've personally been loving Turbolinks 3. I've found I can re-write a Backbone app in 1/3 of the code and get all of the snappy performance
[18:15:56] tubbo: elaptics: well node.js is on version 4 so you know
[18:16:05] MrPunkin: What???s the best method for encrypting data to store in the DB that you need to decrypt? I need to store API credentials for an external service so I need a way to access the actual credentials themselves, but don???t want them stored in the DB as plain-text. We use AES-256-CBC with a private token for other data storage in the DB but I didn???t know if there is a better method.
[18:16:07] CanTonic: has joined #RubyOnRails
[18:16:21] glennfu: and with turbo-react, you get css3 transitions between state changes. It's like the holy grail of replacing front-end frameworks
[18:16:38] shibabu: has joined #RubyOnRails
[18:17:02] tubbo: wow what a horribly named gem
[18:17:13] glennfu: so while I'm very excited about all the development. I'm also unsure how to focus my efforts on contributing with all that
[18:17:17] tubbo: they might as well have called it elixir-go-rust-rails
[18:17:21] tubbo: just to get people to look at it :P
[18:17:25] glennfu: tubbo: why's that? It combines turbolinks + react
[18:17:29] tubbo: no it doesn't
[18:17:32] tubbo: not at all
[18:17:52] Pazician_: has joined #RubyOnRails
[18:17:54] glennfu: it intercepts the Turbolinks content, and turns it into a React component, then uses React to render to the page instead
[18:18:09] smathy: MrPunkin, I've found https://github.com/rocketjob/symmetric-encryption good.
[18:18:17] xardion: I think what I may end up doing is implementing this as a rails engine, and put in a code path for a non-rails app to just load the models.
[18:18:39] jeradW: has joined #RubyOnRails
[18:18:44] xardion: since that's what my actual use case is.
[18:18:59] MrPunkin: smathy: Thanks, I???ll take a look.
[18:18:59] glennfu: tubbo: it literally (yes literally) hijacks Turbolinks, and then passes the remaining work off to React.
[18:19:14] hotpancakes: has joined #RubyOnRails
[18:19:22] smathy: MrPunkin, others worth evaluating: https://www.ruby-toolbox.com/categories/encryption
[18:19:24] zpe: has joined #RubyOnRails
[18:20:06] melter: has joined #RubyOnRails
[18:20:06] s2013: has joined #RubyOnRails
[18:20:13] Uranio: has joined #RubyOnRails
[18:21:12] Limix: is it possible to only pg_dump certain fields in a table?
[18:21:29] jeradW: has left #RubyOnRails: ()
[18:21:38] Limix: Whats the best strategy for migrating data to a new schema from an old db?
[18:22:02] Limix: I would like to pull out just certain fields and disregard the rest
[18:22:12] hypnosb: has joined #RubyOnRails
[18:22:48] Cache_Money: has joined #RubyOnRails
[18:22:52] cac: has joined #RubyOnRails
[18:23:28] mag42c: has joined #RubyOnRails
[18:24:14] jkamenik: has joined #RubyOnRails
[18:25:25] chridal: has joined #RubyOnRails
[18:25:47] hotpancakes: has joined #RubyOnRails
[18:26:47] riotjones: has joined #RubyOnRails
[18:26:58] bvbrandon: has joined #RubyOnRails
[18:27:16] bvbrandon: has anyone ever used a google sheets doc to create objects?
[18:27:18] drale2k: has joined #RubyOnRails
[18:28:35] bvbrandon: lets say I have a team with no access to our db, but they have a google sheet doc with the exact data I need, can I just create a connection to have rails generate objects based on that data?
[18:29:28] Cache_Money: has joined #RubyOnRails
[18:30:01] glennfu: bvbrandon: I've done that with the gdata_19 and google_drive gems
[18:30:08] platzhirsch: has joined #RubyOnRails
[18:30:15] platzhirsch: Anyone using teaspoon with Rails 2.3?
[18:30:33] glennfu: client = GData::Client::Spreadsheets.new; client.clientlogin(email, password). Then you can loop through and edit worksheets and everything
[18:30:48] bvbrandon_: has joined #RubyOnRails
[18:30:52] bvbrandon_: awesome! Ill look into that
[18:30:57] glennfu: so that means you can actually write back to it as well if you want
[18:31:18] jkamenik: has joined #RubyOnRails
[18:31:52] smathy: Limix, you'll probably find better help on that in a pg specific chat.
[18:31:58] bvbrandon__: has joined #RubyOnRails
[18:33:03] Limix: thanks smathy
[18:33:42] raunicolae: has joined #RubyOnRails
[18:34:23] platzhirsch: Is it possible to use railties 3.2.5 in Rails 2.3?
[18:34:23] creyes: has joined #RubyOnRails
[18:34:42] colleenmcguckin: has joined #RubyOnRails
[18:34:49] lacuna: has joined #RubyOnRails
[18:35:12] mag42c: has left #RubyOnRails: ()
[18:35:49] Balllkenende: has joined #RubyOnRails
[18:35:59] smathy: platzhirsch, if you tried and it didn't work, then no.
[18:36:21] rhizome: highly doubtful
[18:36:30] HalcyonicStorm: unless you do lots of patching
[18:36:34] HalcyonicStorm: and backporting
[18:36:35] banister: has joined #RubyOnRails
[18:36:52] platzhirsch: makes sense, cool
[18:36:55] roshanavand: has joined #RubyOnRails
[18:37:52] smathy: platzhirsch, my point is that if it doesn't work then you'll need to be adjusting the code of one gem or another, and then you don't really have 2.3.x and 3.2.5 anymore. I mean obviously it's possible to make it work by editing some amount of code, ie. by making your the Rails 2.3 code close enough to 3.2.5 that railties will work - but meh, not really what I call a solution :)
[18:38:29] bmalum: has joined #RubyOnRails
[18:38:31] platzhirsch: ah I see, yeah that's fair enough and nothing I want to be playing around at the moment, as it would probably break production code
[18:39:17] rhizome: bundle update will fix whatever comes up
[18:40:20] platzhirsch: mhm, jasmine-rails is the same, looks like I am stuck *cry*
[18:40:23] tubbo: platzhirsch: is this real? rails5countdown.com
[18:40:34] platzhirsch: tubbo: that's my piece yes
[18:40:34] tubbo: why did it suddenly jump like 400 days? :D
[18:40:43] platzhirsch: good question, not sure, probably new issues?
[18:40:47] Trynemjoel: has joined #RubyOnRails
[18:40:53] tubbo: platzhirsch: the whole team just got super lazy
[18:40:55] hmsimha_: has joined #RubyOnRails
[18:40:57] platzhirsch: I have to improve the estimation algorithm, it's a bit poor atm
[18:41:19] tubbo: i like the concept a lot
[18:41:35] platzhirsch: Was more of a people stunt to be frank
[18:41:44] kalusn: has joined #RubyOnRails
[18:41:48] platzhirsch: At work stuck with Rails 2.3, but making a Rails 5 countdown, so ironic
[18:42:16] tubbo: platzhirsch: my last job was rails 2.3 all day.
[18:42:17] tubbo: it sucked.
[18:42:25] blackmes1: has joined #RubyOnRails
[18:42:58] mary5030_: has joined #RubyOnRails
[18:43:22] platzhirsch: makes me want to do a Rails 4 side project, just for therapy reasons
[18:44:21] drbayer_: has joined #RubyOnRails
[18:45:19] centrx: Sure, but was it snowing uphill both ways?
[18:45:20] momomomomo: has joined #RubyOnRails
[18:47:29] kalusn: has joined #RubyOnRails
[18:47:33] platzhirsch: so maybe I can crank something out myself? Can't I shove code into a Rakefile that launches my web app and then I run the JS tests I want to do?
[18:47:59] User458764: has joined #RubyOnRails
[18:48:18] safety_cut: has joined #RubyOnRails
[18:48:38] Trynemjoel: has joined #RubyOnRails
[18:48:38] daivyk: has joined #RubyOnRails
[18:48:43] raunicolae: has left #RubyOnRails: ("Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is")
[18:49:07] kitsuneyo: has joined #RubyOnRails
[18:51:29] dikaio: has joined #RubyOnRails
[18:52:57] tubbo: platzhirsch: what's the problem you're trying to solve by adding railties 3.2 into your project?
[18:53:14] platzhirsch: tubbo: I want to use teaspoon which is a JS test runner :) which has integration for Mocha
[18:53:25] corioliss: has joined #RubyOnRails
[18:54:31] yfeldblum: has joined #RubyOnRails
[18:54:32] tubbo: platzhirsch: ah, well that's probably not going to work.
[18:54:39] tubbo: it's a rails 3+ plugin, the entire plugin API was rewritten after 3
[18:55:00] platzhirsch: ah fair enough, yeah.. but I can't I just write a small script on my own? Probably not as easily
[18:55:06] tubbo: platzhirsch: this is what ember.js uses to run its tests: https://github.com/airportyh/testem
[18:55:21] tubbo: i figure you could probably use that and phantomjs to get headless tests, that are outside of your rails environment.
[18:55:34] harishreddy: has joined #RubyOnRails
[18:56:32] lemur: has joined #RubyOnRails
[18:56:46] platzhirsch: I just want to do some integration tests, probably use Mocha with Selenium. Launch Rails app, go to site /x/z/y, click dat button and see if the dom changes to my liking
[18:57:58] rhizome: you can do that with just minitest and capybara
[18:58:22] tubbo: especially if you want to use selenium
[18:58:51] siemprefresco: has joined #RubyOnRails
[18:58:58] ibouvousaime: has joined #RubyOnRails
[18:59:16] hmsimha_: has joined #RubyOnRails
[19:00:18] beauby: has joined #RubyOnRails
[19:00:20] TheNet: has joined #RubyOnRails
[19:00:24] C0r3: has joined #RubyOnRails
[19:00:27] chridal: has joined #RubyOnRails
[19:05:38] DEA7TH: has joined #RubyOnRails
[19:06:03] C0r3: has left #RubyOnRails: ()
[19:08:12] lacuna: has joined #RubyOnRails
[19:08:12] lacuna: has joined #RubyOnRails
[19:08:56] bonhoeffer: has joined #RubyOnRails
[19:09:10] VeryBewitching: has joined #RubyOnRails
[19:09:18] annlewis: has joined #RubyOnRails
[19:09:19] colleenmcguckin: has joined #RubyOnRails
[19:09:48] SteenJobs: has joined #RubyOnRails
[19:09:53] TheNet: has joined #RubyOnRails
[19:10:12] baweaver: has joined #RubyOnRails
[19:12:18] lbwski: has joined #RubyOnRails
[19:13:07] czerasz: has joined #RubyOnRails
[19:13:17] tuelz1: has joined #RubyOnRails
[19:14:15] s2013: in a rails maielr whats the best way to access to the email address
[19:14:28] Pupeno: has joined #RubyOnRails
[19:14:46] s2013: i have a partial for the footer that has an unsubscribe link to the users email address. i basically want that to include the recipients email address in the link
[19:14:56] platzhirsch: has left #RubyOnRails: ()
[19:15:17] antgel: has joined #RubyOnRails
[19:15:29] nettoweb: has joined #RubyOnRails
[19:17:04] tercenya: has joined #RubyOnRails
[19:18:08] _djbkd: has joined #RubyOnRails
[19:18:16] hotpancakes: has joined #RubyOnRails
[19:18:31] hotpancakes: has joined #RubyOnRails
[19:18:42] rhizome: are you passing the user into the mailer?
[19:18:56] s2013: yeah but not all of them
[19:19:34] s2013: can i do somehting like content_for(:to) ? not sure if that will make sense
[19:19:35] rhizome: all of who?
[19:19:43] chrisja: has joined #RubyOnRails
[19:20:56] bruno-: has joined #RubyOnRails
[19:21:14] chrisja: has joined #RubyOnRails
[19:21:19] ur5us: has joined #RubyOnRails
[19:21:22] newmanships: has joined #RubyOnRails
[19:21:23] platzhirsch: has joined #RubyOnRails
[19:21:26] platzhirsch: Sorry got disconnected
[19:21:50] tuelz1: sounds like all you need to be doing is having the unsub link hit an action which passes a param with you user so that inside the action you can send that param to a mailer in to to field
[19:21:51] atomical: has joined #RubyOnRails
[19:22:14] platzhirsch: tubbo: cappybara and mini test?
[19:22:16] chrisja: has joined #RubyOnRails
[19:25:05] s2013: all of the mailers rhizome .. some are sent to our users.. some are sent to leads, some are sent to others
[19:25:16] FailBit: https://i.imgur.com/h461aPl.gif
[19:26:15] FailBit: it's a cerated blade
[19:26:29] platzhirsch: tubbo: so I've read a bit more. Is capybara still state of the art? I haven't heard much about it anymore
[19:27:04] User458764: has joined #RubyOnRails
[19:27:11] tuelz1: s2013: do have a link hit an action and then inside the action call all the mailers you need with the appropriate params
[19:27:36] riotjones: has joined #RubyOnRails
[19:29:00] atomical_: has joined #RubyOnRails
[19:29:32] Guest53: has joined #RubyOnRails
[19:29:47] _djbkd: has joined #RubyOnRails
[19:29:52] rhizome: platzhirsch: still active
[19:30:13] platzhirsch: Just wondering what the most light-weight option me is here :)
[19:30:16] lacuna: has joined #RubyOnRails
[19:30:29] rhizome: not-selenium, then
[19:30:40] colleenmcguckin: has joined #RubyOnRails
[19:31:54] s2013: tuelz1 yea but i didnt want to pass the email explicitly.. its fine. thanks
[19:32:02] coderabbit: has joined #RubyOnRails
[19:32:04] platzhirsch: so capybara-webkit ? Throw some libraries at me
[19:32:39] Miron_: has joined #RubyOnRails
[19:32:54] smathy: platzhirsch, https://github.com/jnicklas/capybara#drivers
[19:33:01] tuelz1: s2013: sorry, I must've come in halfway through the discussion. If by 'email explicitly' you mean passing the contents of the email you don't have to do that in ther controller.
[19:33:13] s2013: no. the email address
[19:33:41] mary5030: has joined #RubyOnRails
[19:33:52] rhizome: i don't understand. are you really having this much trouble using the email address of the person you are sending the email to?
[19:34:26] tuelz1: well, you still wouldn't `have` to. You could do logic in the mailer class and then pass the metadata when calling the deliver on that mailer
[19:34:28] banister: has joined #RubyOnRails
[19:35:21] chridal: has joined #RubyOnRails
[19:35:38] smathy: s2013, you're asking if you can access the recipient's email address inside the template without setting an ivar in your mailer?
[19:35:52] smathy: s2013, you can't.
[19:35:58] s2013: k thats all i was asking
[19:36:27] smathy: ACTION speaks s2013-ese ;)
[19:36:30] s2013: rhizome because its a template.. i wanted to access the email address of the recipient without setting it/passing it
[19:36:43] s2013: but yeah smathy answered it
[19:36:51] rhizome: why make things harder than they need to be
[19:36:53] s2013: thanks smathy rhizome tuelz1
[19:37:10] s2013: it makes it easier.. since this is a tempalte used for dozens of different emails
[19:37:43] s2013: the instance variable is named different. (dont ask) but also cause we have different people are sending out mails to
[19:38:04] smathy: s2013, so inherit from a common base class, and use a before_action in there to set @to or whatever you want.
[19:38:06] RegulationD: has joined #RubyOnRails
[19:38:16] vigintas: has joined #RubyOnRails
[19:38:33] s2013: smathy yea thats what im going to end up having to do.. just wanted to know if i could access the to address but since i cant then thats my other option
[19:38:58] simplyia_: has joined #RubyOnRails
[19:39:49] Maletor: has joined #RubyOnRails
[19:40:05] simplyianm: has joined #RubyOnRails
[19:40:27] Maletor: It is not obvious to me at all on my to verify a multipart email with a signature. What part of the mail is actually signed?
[19:40:33] Guest53: has joined #RubyOnRails
[19:40:42] annlewis: has joined #RubyOnRails
[19:40:56] ellisTAA: has joined #RubyOnRails
[19:41:24] dikaio: has joined #RubyOnRails
[19:42:44] smathy: maletor, is this something to do with Rails? Or you're just asking a general question?
[19:42:51] rhizome: look at screen before hitting enter
[19:42:59] Maletor: Ooops. wrong channel. rhizome word.
[19:43:12] Maletor: ACTION puts glasses on
[19:43:31] rhizome: it doesn't take long to learn touch typing
[19:43:34] smathy: You need quotes around the argument to `puts`
[19:43:41] chridal: has joined #RubyOnRails
[19:44:31] Trynemjoel: has joined #RubyOnRails
[19:45:25] jessemcgilallen: has joined #RubyOnRails
[19:46:12] roshanavand: has joined #RubyOnRails
[19:46:20] pwnd_nsfw: has joined #RubyOnRails
[19:46:44] Motoservo: has joined #RubyOnRails
[19:47:14] infamos: has joined #RubyOnRails
[19:47:15] baweaver: has joined #RubyOnRails
[19:47:17] theblang: has joined #RubyOnRails
[19:47:36] ellisTAA: i need to create an api that is stateful so that it can keep some information in memory so that it can make quick calculations, as someone who is a jr, what is the best way to do this with a rails api app? should i use memcache?
[19:47:50] ibouvousaime_: has joined #RubyOnRails
[19:48:37] rhizome: a jr is assigned to design a stateful api?
[19:48:58] Axsuul: has joined #RubyOnRails
[19:48:58] ellisTAA: rhizome: i know right wtf
[19:49:32] Pazician: has joined #RubyOnRails
[19:49:36] Motoservo: has left #RubyOnRails: ()
[19:49:45] rhizome: an opportunity and vote of confidence i guess
[19:49:57] ellisTAA: exactly i???m just going to try my best.
[19:50:16] ellisTAA: rhizome: my only thought was ???ive heard of memcached??? ???
[19:50:20] jessemcgilallen: has joined #RubyOnRails
[19:50:21] bitwise_: platzhirsch: check out nightwatchjs if yuo havent yet
[19:50:32] elton: has joined #RubyOnRails
[19:50:32] smathy: EllisTAA, how much information? Could the values just be stuffed in the DB?
[19:50:48] rhizome: i would start by forgetting the "stateful" part for now
[19:51:00] ellisTAA: rhizome: that???s a good idea .. ty
[19:51:10] chills42: has joined #RubyOnRails
[19:51:13] ellisTAA: smathy: not sure, i imagine it will eventually be a lot of info, but at the moment not that much
[19:51:15] rhizome: read up on HATEOAS for good measure
[19:51:29] rhizome: (not that it will govern your design)
[19:51:38] ellisTAA: rhizome: ok cool ill do that
[19:51:52] smathy: EllisTAA, then for the moment I would just store it in the DB.
[19:52:05] rhizome: live calculations, whatever they are
[19:52:14] ellisTAA: smathy: but the boss said must be stateful
[19:53:54] Radar: +1 storing it in the database
[19:54:17] colleenmcguckin: has joined #RubyOnRails
[19:54:30] smathy: EllisTAA, "stateful" is probably the most fundamental thing you could say about a DB.
[19:55:03] lacuna: has joined #RubyOnRails
[19:55:03] nickenchuggets__: has left #RubyOnRails: ()
[19:55:03] lacuna: has joined #RubyOnRails
[19:55:06] creyes: front-end question: Using chartkick to render graphs. I'd have a list of users, I'd like to click on the user and have the graph update to only show their data. What's the best way to do this without re-query'ing the server everytime
[19:55:10] ellisTAA: smathy: lol
[19:55:11] maxx88: EllisTAA: you could try the new book
[19:55:19] ellisTAA: maxx88: what???s that
[19:55:33] rhizome: creyes: put all the possible data in a var on the page
[19:55:44] maxx88: EllisTAA: book, restful rails development by silvia puglisi. just came out 2 weeks ago.
[19:55:57] ellisTAA: maxx88: k thanks
[19:56:31] nickenchuggets: has joined #RubyOnRails
[19:57:08] nickenchuggets: ActiveRecord::Base#serialize
[19:57:13] lemur: has joined #RubyOnRails
[19:57:15] creyes: rhizome: I thought about that. But i'm not sure how to (using erb) extract pieces of that data. I can visualize how to do that with Angular... but not just in rails
[19:57:26] arooni: has joined #RubyOnRails
[19:57:49] ruurd: has joined #RubyOnRails
[19:58:25] dionysus69: can anyone tell me why there is a nil value at the beginning of hash after calling Product.uniq.pluck(:category)?
[19:58:29] rhizome: well you wouldn't use erb, you'd use javascript. you need everything in the page when you serve the page that you subsequently want to filter by user
[19:58:39] rhizome: without round-trips
[19:59:06] rhizome: dionysus69: are some of your categories nil?
[19:59:32] dionysus69: hmm that made me thinking
[20:00:34] dionysus69: where should I start with js based drop drown menu generated based on unique values of category column?
[20:00:36] jkamenik: has joined #RubyOnRails
[20:00:57] dionysus69: is there a gem or something I should know, because if I do it from scratch I am better off using rails instead of js
[20:01:20] Motoservo: has joined #RubyOnRails
[20:02:20] Motoservo: has left #RubyOnRails: ()
[20:02:38] jkamenik: has joined #RubyOnRails
[20:03:42] rhizome: eh, google "dynamic dropdown" or something
[20:04:14] jkamenik1: has joined #RubyOnRails
[20:04:56] SteenJobs: has joined #RubyOnRails
[20:05:12] doodlehaus: has joined #RubyOnRails
[20:05:17] dionysus69: hmm ok thanks, also consider that I have over 500 items paginated over 7ish pages so is it still good idea to use js for that?
[20:05:26] rhizome: i don't know
[20:06:30] jkamenik2: has joined #RubyOnRails
[20:07:10] dionysus69: haha ok :) thanks anyway :D
[20:08:17] blackmes1: has joined #RubyOnRails
[20:08:18] RegulationD: has joined #RubyOnRails
[20:08:35] RegulationD: has joined #RubyOnRails
[20:10:42] elton_: has joined #RubyOnRails
[20:12:42] elton_: has joined #RubyOnRails
[20:13:02] FCser: has joined #RubyOnRails
[20:13:44] Aherin: has joined #RubyOnRails
[20:14:42] peterhil: has joined #RubyOnRails
[20:14:45] test: has joined #RubyOnRails
[20:15:23] drale2k: has joined #RubyOnRails
[20:20:39] roshanavand: has joined #RubyOnRails
[20:22:55] Coldblackice: has joined #RubyOnRails
[20:24:28] lacuna: has joined #RubyOnRails
[20:24:33] peterhil: has joined #RubyOnRails
[20:25:33] colleenmcguckin: has joined #RubyOnRails
[20:28:25] riotjones: has joined #RubyOnRails
[20:29:46] chibs: has joined #RubyOnRails
[20:30:35] roshanavand: has joined #RubyOnRails
[20:32:23] b4tm4n: has joined #RubyOnRails
[20:33:36] b4tm4n: i have a ruby on rails app running with nginx and unicorn. Everything worked great in production using https. However, I'm moving back to http and i'm having hte issue that something is always redirecting requests on port 80 to 443 and I cannot find it.
[20:33:38] b4tm4n: Thoughts?
[20:33:41] netzfisch: has joined #RubyOnRails
[20:33:45] DiCablo: has joined #RubyOnRails
[20:33:55] cschneid_: has joined #RubyOnRails
[20:34:45] mwlang: using simple_form_for to build a search form: Can I instruct the builder not to prefix everything with ???search???? i.e. just give me params[:q] instead of params[:search][:q]
[20:34:47] lacuna: has joined #RubyOnRails
[20:34:47] lacuna: has joined #RubyOnRails
[20:34:55] Miron_: has joined #RubyOnRails
[20:35:11] mwlang: b4tm4n: most likely in the nginx configuration
[20:35:29] colleenmcguckin: has joined #RubyOnRails
[20:35:29] b4tm4n: mwlang, that's what i would have thought too, but i cannot find it
[20:35:33] Radar: b4tm4n: !debug-proxy
[20:35:33] helpa: b4tm4n: This kind of issue is hard to debug remotely. You should hire someone who can look at your code and figure it out. We are most likely unable to help you in this situation.
[20:35:47] Radar: b4tm4n: If it's redirecting then I suspect an ssl_required (or similar) call in your codebase.
[20:36:01] mwlang: b4tm4n: if it???s not there, then try looking for ssl in the rails code
[20:36:50] meoblast001: has joined #RubyOnRails
[20:37:50] nhhagen: has joined #RubyOnRails
[20:37:54] SeanLazer: has joined #RubyOnRails
[20:37:54] platzhirsch: Where should I put my acceptance tests for testing the website? spec/views?
[20:38:22] edmundspenser: has joined #RubyOnRails
[20:38:41] tubbo: platzhirsch: i usually put them in spec/features
[20:38:49] b4tm4n: there's not something specific to production that forces ssl, is ther?
[20:38:51] platzhirsch: ah, is that a Rails'ism?
[20:39:03] SeanLazer: has joined #RubyOnRails
[20:39:08] platzhirsch: Feature specs are high-level tests meant to exercise slices of functionality
[20:39:08] platzhirsch: through an application.??
[20:39:09] tubbo: platzhirsch: it seems to be
[20:39:16] bitwise_: platzhirsch: separate repo?
[20:39:29] platzhirsch: bitwise_: that's a bit drastic
[20:39:31] m3_del: has joined #RubyOnRails
[20:41:38] annlewis: has joined #RubyOnRails
[20:42:05] smathy: I'd say "domain functions" rather than "slices of functionality"
[20:42:20] stamina: has joined #RubyOnRails
[20:42:25] smathy: ...although "meant to" is a misnomer with most features of Rails ;)
[20:42:37] baweaver: has joined #RubyOnRails
[20:43:27] yfeldblum: has joined #RubyOnRails
[20:45:32] willardg: has joined #RubyOnRails
[20:48:18] bitwise_: platzhirsch: it shouldn't have any dependency on the code in your project repo. should just be making http requests to the staging/dev server right?
[20:48:45] platzhirsch: bitwise_: ah, you're right. That would be a proper acceptance test environment I guess
[20:48:56] platzhirsch: I just want to test that some DOM elements change as expected
[20:50:06] kitsuneyo: has joined #RubyOnRails
[20:50:09] HalcyonicStorm: has joined #RubyOnRails
[20:50:25] MartinElvar: has joined #RubyOnRails
[20:50:49] Cervajz: has joined #RubyOnRails
[20:51:02] jahbrewski: has joined #RubyOnRails
[20:51:15] pwnd_nsfw: has joined #RubyOnRails
[20:53:16] neanderslob: has joined #RubyOnRails
[20:53:25] jessemcgilallen: has joined #RubyOnRails
[20:54:19] benlieb: has joined #RubyOnRails
[20:56:37] j4d: has joined #RubyOnRails
[20:57:47] kitsuneyo: has joined #RubyOnRails
[20:57:53] safety_cut: has joined #RubyOnRails
[20:58:02] lemur: has joined #RubyOnRails
[20:58:44] _tpavel: has joined #RubyOnRails
[20:58:45] mustmodify: has joined #RubyOnRails
[21:00:23] rickmasta: has joined #RubyOnRails
[21:00:38] hashpuppy: has joined #RubyOnRails
[21:00:40] mustmodify: When a create or update action fails because of validations, would it be more appropriate for an API to return a 403 Forbidden ( The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated. ) OR a 409 Conflict ( The request could not be completed due to a conflict with the current state of the resource. This code is only allowed in situations where it is expected that the user
[21:01:31] Guest53: has joined #RubyOnRails
[21:01:40] Radar: 422 is the standard in this case. It means "resource invalid"
[21:01:46] TheNet: has joined #RubyOnRails
[21:02:02] m3_del: has joined #RubyOnRails
[21:02:04] tubbo: mustmodify: 403 was classically used for a link that was "taken down", but is commonly used these days to denote when a user fails authentication...whereas 401 Unauthorized is used to denote when a user can't be authorized for the given resource.
[21:02:40] jgt1: has joined #RubyOnRails
[21:04:27] User458764: has joined #RubyOnRails
[21:04:59] DiCablo: has joined #RubyOnRails
[21:05:01] kitsuneyo: has joined #RubyOnRails
[21:05:24] willardg: has joined #RubyOnRails
[21:05:39] banister: has joined #RubyOnRails
[21:05:44] Miron_: has joined #RubyOnRails
[21:06:17] OmegaA_: has left #RubyOnRails: ()
[21:06:20] mustmodify: Radar: Hm... the description for 422 doesn't really hit me as better than the description of 403 or 409 but ... I'll look further into it.
[21:06:23] TheNet: has joined #RubyOnRails
[21:06:32] OmegaA: has joined #RubyOnRails
[21:06:37] OmegaA: Hey guys. I'm trying to set up an ActionCable server, but I get an 'uninitialized constant ApplicationCable::Connection' error when I run rails server. Not really sure if I've missed something blatently obvious, but I'm following the readme on the github.
[21:07:45] sarink: has joined #RubyOnRails
[21:09:13] TheNet: has joined #RubyOnRails
[21:09:29] kitsuneyo: has joined #RubyOnRails
[21:10:05] l1meon_: has joined #RubyOnRails
[21:10:10] smathy: mustmodify, 403 is an authorization error, nothing to do with validation.
[21:11:32] smathy: mustmodify, 409 is a possibility for an update error, if - for example - another request updated the resource since it was read, so the incoming data is out of date. CouchDB, eg., uses 409 for that exact situation.
[21:11:50] maxx88: I feel so honored. I was the first person to leave a comment on the new rails 4 in action book on amazon.
[21:12:52] smathy: Apologies to tubbo - but 401 (despite its name) is for authentication failure, not authorization failre.
[21:13:50] Radar: mustmodify: 422 is what Rails has used for _years_
[21:14:36] kitsuneyo: maxx88, how is the book? i have it, but not started it yet
[21:14:37] Radar: Hm, I just noticed that in api.marketplacer.com/v2 I don't show an example of an invalid resource
[21:14:39] nettoweb: has joined #RubyOnRails
[21:14:44] Radar: maxx88: :O :O
[21:14:51] griffindy: has joined #RubyOnRails
[21:15:11] kies^: has joined #RubyOnRails
[21:15:17] smathy: Yeah nothing wrong with a 422, just that there are some more specific options if you really want.
[21:15:36] maxx88: kitsuneyo: well written and worth the read, for sure!
[21:15:40] Radar: http://goo.gl/souySn
[21:15:54] Miron: has joined #RubyOnRails
[21:16:05] kitsuneyo: max88 did you learn a lot? i don't know advanced you are, i'm still beginner myself
[21:16:42] Radar: https://twitter.com/ryanbigg/status/662015515318087680
[21:16:45] mustmodify: The more you know, the more you know how much you don't know.
[21:17:16] maxx88: kitsuneyo: you can read it if your a beginner or junior dev and learn a lot no matter where you are at
[21:17:32] Radar: It's not _completely_ dishonest ;)
[21:18:00] slash_nick: good thing you were awake to take advantage of the opportunity... not to say that 5 star rating won't remain
[21:18:03] havenwood: has joined #RubyOnRails
[21:18:04] maxx88: radar: very funny, quick action!!
[21:18:24] Radar: slash_nick: It probably won't remain. People are always quicker to leave a bad review than they are a good one.
[21:18:29] Radar: Thanks to maxx88 for leaving a great review :)
[21:18:34] kitsuneyo: cool max88, i'm gonna start on it soon
[21:18:36] arthurix_: has joined #RubyOnRails
[21:18:58] maxx88: radar: you???re welcome!
[21:19:30] gaussblurinc1: has joined #RubyOnRails
[21:21:08] shibabu: has joined #RubyOnRails
[21:23:22] TheNet: has joined #RubyOnRails
[21:25:16] jahbrewski: has joined #RubyOnRails
[21:29:11] Axsuul: has joined #RubyOnRails
[21:29:13] riotjones: has joined #RubyOnRails
[21:30:32] _djbkd: has joined #RubyOnRails
[21:32:15] hmsimha_: has joined #RubyOnRails
[21:32:36] chridal: has joined #RubyOnRails
[21:33:30] Guest53: has joined #RubyOnRails
[21:35:18] ruurd_: has joined #RubyOnRails
[21:35:28] rgtk: has joined #RubyOnRails
[21:35:48] EminenceHC: has joined #RubyOnRails
[21:36:46] Icey: has joined #RubyOnRails
[21:36:46] Icey: has joined #RubyOnRails
[21:39:13] purplexed-: has joined #RubyOnRails
[21:39:14] Eminence_: has joined #RubyOnRails
[21:42:14] annlewis: has joined #RubyOnRails
[21:42:57] arthurix: has joined #RubyOnRails
[21:42:57] elton: has joined #RubyOnRails
[21:43:12] OmegaA: Hey guys. I'm trying to set up an ActionCable server, but I get an 'uninitialized constant ApplicationCable::Connection' error when I run rails server. Not really sure if I've missed something blatently obvious, but I'm following the readme on the github.
[21:43:37] mustmodify: has left #RubyOnRails: ()
[21:45:09] bvbrandon: has joined #RubyOnRails
[21:45:14] OmegaA: Checking in the console, it seems like ApplicationCable::Connection ISN'T part of the application. I thought everything under app/ was included in the namespace?
[21:45:20] chridal: has joined #RubyOnRails
[21:45:32] bvbrandon: how do I add an SQLite3 db to a rails app?
[21:45:47] bvbrandon: is there a command I can run to generate that?
[21:46:35] bvbrandon: rails new -d sqlite3 ?
[21:46:35] willardg: has joined #RubyOnRails
[21:47:10] tbuehlmann: bvbrandon, sqlite3 is the default, so just `rails new <app_name>`
[21:47:18] smathy: bvbrandon, add it? Just add the gem, and edit your database.yml
[21:47:23] ss_much: has joined #RubyOnRails
[21:51:58] elton: has joined #RubyOnRails
[21:52:04] Radar: > it seems like ApplicationCable::Connection ISN'T part of the application.
[21:52:07] Radar: OmegaA: ^
[21:52:19] Radar: OmegaA: Rails or other gems aren't magically included into app.
[21:52:23] Radar: app is your own application's code.
[21:52:28] Radar: Can you show us what you've tried?
[21:53:17] jahbrewski: has joined #RubyOnRails
[21:53:21] srinidhi: has joined #RubyOnRails
[21:53:39] capin: afternoon, I'm presently using the refile gem to manage attachments, and I'm in a bit of a pickel. I can upload attachments just fine, but in order to download / access the attachment a pretty cryptic URL is required, and was wondering if anyone has a particular way for accessing the files.
[21:53:50] bitwise_: bvbrandon: sqlite3 foo.db
[21:53:52] bitwise_: that will create it
[21:53:55] Radar: capin: Doesn't it have a method for that?
[21:53:56] h7br1x: has joined #RubyOnRails
[21:55:23] wldcordeiro: has joined #RubyOnRails
[21:55:40] hmsimha_: has joined #RubyOnRails
[21:55:44] CanTonic: has joined #RubyOnRails
[21:55:45] OmegaA: ApplicationCable::Connection is a class I've defined.
[21:55:46] banister: has joined #RubyOnRails
[21:55:52] capin: Radar: I have the rails console open at the moment, and there is indeed a method you can run in rails console and it will generate the required URL to download the file, but I'm not sure how I can get that URL otherwise (does that make sense)?
[21:55:57] OmegaA: In app/channels/application_cable/connection.rb
[21:56:22] Radar: capin: and what is the method
[21:56:36] OmegaA: https://gist.github.com/jrobertsgb/0bf1548b9914dfeabc13 < that
[21:56:44] Radar: OmegaA: Can you put the app up on GitHub?
[21:56:53] EminenceHC: has joined #RubyOnRails
[21:57:27] quazimodo: has joined #RubyOnRails
[21:57:41] ellisTAA: has joined #RubyOnRails
[21:58:45] baweaver: has joined #RubyOnRails
[21:58:49] Ropeney: has joined #RubyOnRails
[22:00:31] OmegaA: https://github.com/jrobertsgb/infinitymud
[22:00:41] OmegaA: Currently more of a haphazard job to test ActionCable >.>
[22:00:41] willardg: has joined #RubyOnRails
[22:02:00] elton: has joined #RubyOnRails
[22:02:02] stannard_: has joined #RubyOnRails
[22:02:13] tubbo: OmegaA: betas :D i tried messing with it a few months ago and just didn't feel like diving into the source to figure it out quite yet
[22:02:34] capin: Radar: the method is .csv_file_url and I using it in the rails console like this, https://ghostbin.com/paste/jd58r
[22:03:06] OmegaA: Not even beta yet, tubbo, alpha still, I think. ;)
[22:03:14] OmegaA: ACTION wants Rails 5 naow! :<
[22:03:23] tubbo: OmegaA: don't you need another rackup file to run the ActionCable server?
[22:03:43] drale2k: has joined #RubyOnRails
[22:03:45] OmegaA: I'm running ActionCable on the same tiny instance as rails.
[22:04:15] tubbo: OmegaA: that doesn't matter. ActionCable is like Faye, it runs a separate websocket server on another process to handle websocket connections.
[22:04:18] shinnya: has joined #RubyOnRails
[22:04:20] OmegaA: I've seen people using puma as a different app, but I'd prefer to keep everything on port HTTP.
[22:04:20] j4d: has joined #RubyOnRails
[22:04:27] tubbo: port HTTP? :D
[22:04:33] tubbo: the worst airport
[22:04:52] tubbo: you can't
[22:05:02] OmegaA: The instructions say you can add a line to routes.rb to have things routed from /websocket to ActionCable.server
[22:05:15] tubbo: oh cool :)
[22:05:32] OmegaA: Of course, my problem right now is that ApplicationCable::Connection DOES NOT EXIST
[22:06:02] OmegaA: I did try to run connection.rb, got this: uninitialized constant ApplicationCable::ActionCable (NameError)
[22:06:12] smathy: capin, are you struggling to create a link that triggers a download in the browser?
[22:06:20] OmegaA: Thinking it's searching the module for Connection's superclass? O.o
[22:06:44] alex88: has joined #RubyOnRails
[22:06:50] AnoHito_: has joined #RubyOnRails
[22:07:17] capin: smathy: i'm trying to figure out how i can get the link for an uploaded file without having to go into the rails console
[22:07:56] smathy: capin, so did you read the refile README ?
[22:08:04] smathy: capin, it demonstrates it pretty clearly.
[22:08:05] Seich: has joined #RubyOnRails
[22:08:10] OmegaA: Ruby's weird and I'm confused! :D
[22:08:21] capin: smathy: just a couple times ;)
[22:08:35] platzhirsch: has left #RubyOnRails: ()
[22:09:11] OmegaA: Actually, disregard that, I sorta realised that Ruby won't be using the gemfile so it doesn't know about ActionCable.
[22:09:58] EminenceHC: has joined #RubyOnRails
[22:10:10] GragHarker: has joined #RubyOnRails
[22:10:20] smathy: capin, bottom of the "Quick Start, Rails" section.
[22:11:07] bruno-: has joined #RubyOnRails
[22:11:47] leonardoajim: has joined #RubyOnRails
[22:12:00] elton: has joined #RubyOnRails
[22:12:12] leonardoajim: has joined #RubyOnRails
[22:12:24] renews: has joined #RubyOnRails
[22:12:32] capin: i see, <%= image_tag attachment_url(@user, :profile_image, :fill, 300, 300, format: "jpg") %>
[22:12:34] bmalum: has joined #RubyOnRails
[22:12:46] capin: is that what your referring too?
[22:13:09] neanderslob: has joined #RubyOnRails
[22:13:37] rhizome: that looks reasonable
[22:14:57] fields: has joined #RubyOnRails
[22:17:42] pydave6367: has joined #RubyOnRails
[22:17:52] GeissT: has joined #RubyOnRails
[22:18:05] Guest53: has joined #RubyOnRails
[22:18:49] capin: if the files are being uploaded via an API, and there's no views for the API because it returns JSON, im not sure how / where the above line could help. Now I understand it needs to go in a view, but not sure how a view would help
[22:19:13] maxz: has joined #RubyOnRails
[22:19:40] Fire-Dragon-DoL: mhhh... Any opinion on how to speed up migrations for very large data tables (postgresql?) We talk about 1 hour to add one column
[22:20:04] capin: well i understand how a view could help ;) just not sure if i can create a standard my_view.html.erb file for an API
[22:20:31] wethu: has joined #RubyOnRails
[22:20:57] tubbo: Fire-Dragon-DoL: that's hilarious
[22:21:42] Fire-Dragon-DoL: tubbo: it's an email message table based on customer email messages, so yes, it's huge :S
[22:21:45] craysiii: has joined #RubyOnRails
[22:22:01] elton: has joined #RubyOnRails
[22:22:02] rhizome: how often do you add one column?
[22:24:06] roshanavand: has joined #RubyOnRails
[22:24:31] momomomomo: has joined #RubyOnRails
[22:26:14] bruno-_: has joined #RubyOnRails
[22:26:19] patrick: has joined #RubyOnRails
[22:29:05] Guest53: has joined #RubyOnRails
[22:30:01] riotjones: has joined #RubyOnRails
[22:31:58] elton: has joined #RubyOnRails
[22:34:46] htmldrum: has joined #RubyOnRails
[22:36:30] Guest53: has joined #RubyOnRails
[22:36:46] shibabu: has joined #RubyOnRails
[22:37:58] kitsuneyo: has joined #RubyOnRails
[22:38:41] patrick2: has joined #RubyOnRails
[22:40:18] hmsimha_: has joined #RubyOnRails
[22:41:03] raidiant: has joined #RubyOnRails
[22:41:10] bruno-_: has joined #RubyOnRails
[22:42:21] elton: has joined #RubyOnRails
[22:42:48] infamos: has joined #RubyOnRails
[22:43:00] annlewis: has joined #RubyOnRails
[22:44:46] solars: has joined #RubyOnRails
[22:45:51] Fire-Dragon-DoL: rhizome: I don't know, we don't have a specific quantity over that, but system must be taken down for hours due to this, I wonder if there is a better way to handle it
[22:46:14] Guest53: has joined #RubyOnRails
[22:46:22] bmalum: has joined #RubyOnRails
[22:47:20] quazimodo: has joined #RubyOnRails
[22:47:52] baweaver: has joined #RubyOnRails
[22:48:03] willardg: has joined #RubyOnRails
[22:48:33] OmegaA: Another problem now, my rails app can't connect to redis. Not entirely sure HOW to start a redis server, or if ActionCable is starting one on its own. >.>
[22:48:44] rickmasta: has joined #RubyOnRails
[22:49:49] Radar: OmegaA: redis-server
[22:50:19] pydave6367: has joined #RubyOnRails
[22:50:21] tuelz1: has joined #RubyOnRails
[22:50:34] OmegaA: Aha. Missed the bit where I had to set up my own redis server :P
[22:50:41] arthurix_: has joined #RubyOnRails
[22:51:31] OmegaA: Oh, joy, now CHROME is shouting at me. :D
[22:51:42] oded_: has joined #RubyOnRails
[22:51:45] Radar: Wait, you're telling me 37 Signals released an open source library and the documentation for it is dreadful?!
[22:51:49] Radar: That is SO unlike them
[22:51:55] Radar: *cough* rails, rbenv, sprockets *cough*
[22:52:51] elton: has joined #RubyOnRails
[22:53:11] Guest53: has joined #RubyOnRails
[22:53:55] tubbo: Fire-Dragon-DoL: table length is less important than table width. your table is too wide. it should be normalized somehow into tables that are JOINed together.
[22:54:05] Fire-Dragon-DoL: sorry the lol was @Radar
[22:54:29] tubbo: "system must be taken down for hours due to this" => major code smell. i've never worked on a project in my entire life that even came close to that kind of time frame. database schema updates are quite cheap.
[22:54:54] Fire-Dragon-DoL: tubbo: yes that's the option we are evaluating, although I'm a bit scared about what happens if we perform a join against a very high table at that point (we had a problem with a join on this table previously)
[22:55:22] Fire-Dragon-DoL: high=big height in this case
[22:55:45] tubbo: Fire-Dragon-DoL: how many columns are in this table?
[22:55:47] tubbo: ACTION grabs popcorn
[22:56:09] bruno-: has joined #RubyOnRails
[22:56:26] jessemcgilallen: has joined #RubyOnRails
[22:56:33] andrew-l: has joined #RubyOnRails
[22:56:36] elton: has joined #RubyOnRails
[22:56:55] tubbo: i've worked on DBs with 100 columns on a single table. it still didn't take AN HOUR to change the schema.
[22:56:56] andrew-l: hi - are glyphicons included bootstrap 2 or only from bootstrap 3?
[22:59:10] lacuna: has joined #RubyOnRails
[22:59:10] lacuna: has joined #RubyOnRails
[22:59:37] baweaver: has joined #RubyOnRails
[23:00:40] Fire-Dragon-DoL: tubbo: mh ok thanks for the advice, I'll check if there is something wrong with the table (we might have outdated indexes slowing down everything)
[23:00:53] OmegaA: And now Chrome is giving 'connection failed: invalid frame header' errors when I try to connect using WS
[23:02:48] hashpuppy: has joined #RubyOnRails
[23:03:43] a1fa: has joined #RubyOnRails
[23:03:48] momomomomo: has joined #RubyOnRails
[23:03:54] Guest53: has joined #RubyOnRails
[23:04:24] a1fa: i have a route problem. my "schedule_index" path is getting interpreted as show, but the log says #index
[23:04:49] a1fa: yet, the SQL used is from show
[23:05:38] h7br1x: has joined #RubyOnRails
[23:05:59] _3by8: has joined #RubyOnRails
[23:06:00] craysiii: gist the routes.rb
[23:06:30] crdpink2: has joined #RubyOnRails
[23:07:15] _3by8: So I'm sending out activation emails which takes the user to a form to complete the account creation process and during the process if they fail to enter information, I render the same page again. The problem with that is that my params get cleaned out from the URL. Can I issue a render with params or is there some trick I'm not aware of to keep the params in the URL when it's re-rendered?
[23:08:28] a1fa: craysiii: https://gist.github.com/anonymous/6c9bd0ab99342ee25f32
[23:09:11] nya: has joined #RubyOnRails
[23:10:30] ellisTAA: if i have a rails api and let???s say we have some route called v1/authenticate ??? would i put authenticate in a v1 controller or create a controller called authenticate and index point to that route?
[23:10:52] ellisTAA: if it was up to me id do user/authenticate, but i didn???t come up with the url
[23:10:53] Radar: AuthenticationController#authenticate
[23:11:13] bruno-_: has joined #RubyOnRails
[23:11:21] ellisTAA: radar: wouldn???t that give me authentication/authenticate as the route?
[23:11:35] Radar: EllisTAA: routes don't necessarily match controller+action names
[23:11:46] Radar: post "/authenticate", to: "authentication#authenticate"
[23:11:57] a1fa: i dont understand why its doing this when the log obviously says #index
[23:12:26] a1fa: schedule_index GET /schedule(.:format) schedule#index
[23:12:33] ellisTAA: Radar: so if i???m understanding you, i would just create a controller called authentication and in my routes file change it so post ???authenticate??? points to authentication#authenticate
[23:12:40] Radar: EllisTAA: sure
[23:13:17] treaki: has joined #RubyOnRails
[23:14:14] ellisTAA: Radar: ok cool. what would u say if i asked ???why don???t i put authenticate in a user controller?
[23:14:15] a1fa: craysiii: adding schedule/1 works fine with #show
[23:14:21] OmegaA: What's the deal with my console showing 'Request origin not allowed' when my JS tries to connect to the server?
[23:14:31] Radar: EllisTAA: Is there more actions than just the authenticate for a user?
[23:14:39] OmegaA: Google is being surprisingly unhelpful.
[23:15:00] exadeci: has joined #RubyOnRails
[23:15:31] ellisTAA: Radar: at the moment i dont think so
[23:15:47] Radar: EllisTAA: Then that's why I would make it an authentication controller. All it is concerned with is authenticating.
[23:16:02] ellisTAA: Radar: gotcha ??? ok cool ty for the advice
[23:16:04] a1fa: craysiii: any ideas?
[23:16:59] a1fa: i also dont understand why is this thing being prefixed with "_index" when all my other pages are just pages
[23:19:09] ibouvousaime: has joined #RubyOnRails
[23:19:11] craysiii: a1fa i don't think you're using find correctly
[23:19:38] a1fa: craysiii: ok, i think my routes are wrong
[23:19:45] a1fa: "resources :schedule"
[23:20:52] _3by8: Is it possible to keep my GET parameters in the URL after calling render?
[23:21:36] annlewis: has joined #RubyOnRails
[23:22:10] asianMike: has joined #RubyOnRails
[23:23:12] craysiii: a1fa why are you under the impression that the ScheduleController#show sql is being run
[23:24:49] baweaver: has joined #RubyOnRails
[23:24:54] a1fa: craysiii: i am not.. its defaulting to id null null
[23:25:32] blackmes1: has joined #RubyOnRails
[23:26:05] craysiii: because find is expecting you to pass it id's
[23:26:21] bruno-_: has joined #RubyOnRails
[23:26:23] craysiii: and you're passing it a symbol and a hash
[23:27:13] bonhoeffer: has joined #RubyOnRails
[23:27:45] stannard: has joined #RubyOnRails
[23:28:24] craysiii: you could do something like @schedule.find_by('scheduled_for BETWEEN ? AND ?', start_date, end_date)
[23:30:48] riotjones: has joined #RubyOnRails
[23:31:52] hmsimha_: has joined #RubyOnRails
[23:32:07] elton: has joined #RubyOnRails
[23:33:30] pwnd_nsfw: has joined #RubyOnRails
[23:34:18] Spami: has joined #RubyOnRails
[23:35:26] chridal: has joined #RubyOnRails
[23:35:40] drbayer: has joined #RubyOnRails
[23:36:26] a1fa: craysiii: thanks, that was it
[23:36:37] a1fa: now the form helper is giving me grief
[23:37:08] a1fa: i have to have start_date and end_date
[23:37:24] a1fa: as a column in my database, before form helper would help
[23:39:39] mostlybadfly: hi all, I'm using the cocoon gem to utilize `link_to_add_association` using a Recipe, RecipeItem, and Ingredient model. It looks like when I save my _form.html.erb it is creating a new Recipe and Ingredient as intended, however when I try to click on the link, only a text box for "amount"(RecipeItem attribute) appears , but not "name"(Ingredient attribute),
[23:39:39] mostlybadfly: thoughts? here is the branch I'm working on https://github.com/mostlybadfly/recetera/tree/add-recipe-item
[23:41:01] craysiii: im not too familiar with form helper a1fa
[23:41:13] elton: has joined #RubyOnRails
[23:41:18] bruno-: has joined #RubyOnRails
[23:41:50] jessemcgilallen: has joined #RubyOnRails
[23:43:06] blackmesa: has joined #RubyOnRails
[23:43:07] a1fa: craysiii: i think i will abandon this idea and use ransack
[23:43:35] craysiii: dont let your dreams be dreams. work through it if you think its worth it
[23:46:38] P0w3r3d: has joined #RubyOnRails
[23:47:47] purplexed-: has joined #RubyOnRails
[23:51:12] TheNet: has joined #RubyOnRails
[23:51:25] nettoweb: has joined #RubyOnRails
[23:53:40] SeanLazer: has joined #RubyOnRails
[23:55:50] ankhers: has joined #RubyOnRails
[23:55:54] weaksauce: a1fa just create a raw tag
[23:56:05] weaksauce: don't use the form helper that's attached to an object.
[23:58:12] sevenseacat: has joined #RubyOnRails
[23:58:35] nettoweb: has joined #RubyOnRails