<havenwood>
pabloh: I'd recommend talking to ioquatix, since he's working on the Ruby 3 future of Async/Isolates. This would be a good place to lay out what you're doing: https://gitter.im/socketry/async
MrCrackPot has joined #ruby
MrCrackPot has quit [Client Quit]
<pabloh>
I see, although is kind of early as of right now, to jump into that I think.
<pabloh>
I mean there's not really anything well defined in order as to which API you would be using for Ruby 3.0 for a IO bound workflow, simply that autofiber seems like a good choice.
<havenwood>
pabloh: Happy to help think through connection pool, thread pool, reactor type stuff as are others here if you want to go that way. Or we can direct you to the experts.
fphilipe_ has quit [Ping timeout: 268 seconds]
mossplix_ has quit [Remote host closed the connection]
normanrockwell has joined #ruby
normanrockwell has quit [Client Quit]
<pabloh>
If you can help me configure a thread pool that would be great.
<pabloh>
Or tell me whou might be able to.
<havenwood>
pabloh: Have you considered using a worker queue?
<pabloh>
sidekiq?
<pabloh>
for instance?
<pabloh>
or in process?
<havenwood>
pabloh: Maybe even not redis-backed, somethig in memory?
<pabloh>
That more or less that what I want but I don't know if that idle time is a good choice, or how to limit the max number or threads used per worker to just 10
fphilipe_ has joined #ruby
<pabloh>
So a worker can't exhaust the whole pool by itself
jintseng has joined #ruby
mossplix has joined #ruby
<pabloh>
havenwood, do you know how to improve on that imple?
fphilipe_ has quit [Ping timeout: 260 seconds]
fphilipe_ has joined #ruby
fratis has joined #ruby
lineus has quit [Ping timeout: 240 seconds]
fphilipe_ has quit [Ping timeout: 272 seconds]
fratis has quit [Remote host closed the connection]
fphilipe_ has joined #ruby
bsdband13 has joined #ruby
evert_ has joined #ruby
evert has quit [Read error: Connection reset by peer]
mossplix has quit [Remote host closed the connection]
fphilipe_ has quit [Ping timeout: 260 seconds]
fphilipe_ has joined #ruby
dezdesdfsejlfpso has joined #ruby
<dezdesdfsejlfpso>
hi
fphilipe_ has quit [Ping timeout: 272 seconds]
poontangmessiah has joined #ruby
fphilipe_ has joined #ruby
_phaul has joined #ruby
<havenwood>
dezdesdfsejlfpso: hi
<dezdesdfsejlfpso>
havenwood How are you ?
phaul has quit [Ping timeout: 268 seconds]
envex has joined #ruby
<havenwood>
dezdesdfsejlfpso: out and about, so typing is slow
<dezdesdfsejlfpso>
I understand
x0f has quit [Ping timeout: 248 seconds]
x0f has joined #ruby
<havenwood>
dezdesdfsejlfpso: have any ruby code to share or questions?
<gitter1234>
pablo__: have you tried emailing its author(s)?
<pablo__>
gitter1234, I'm trying the concurrent-ruby slack hopefully he hangs out there, if not I will send and email.
DaRock has quit [Read error: Connection reset by peer]
schne1der has joined #ruby
Inline has quit [Quit: Leaving]
DaRock has joined #ruby
cc_ has joined #ruby
<pablo__>
gitter1234, I meant concurrent-ruby gitter, there's not a slack channel apparently
markopasha has quit [Ping timeout: 260 seconds]
chalkmonster has joined #ruby
sagax has quit [Read error: Connection reset by peer]
howdoi has joined #ruby
dinfuehr has quit [Ping timeout: 260 seconds]
pablo__ has quit [Quit: Leaving]
dinfuehr has joined #ruby
zdm has joined #ruby
suukim has joined #ruby
<gitter1234>
Hi! I'm trying to make it so that users must be approved by admin before they can post. I have two ways of doing it, one regular and one RESTful, both which fail.
<gitter1234>
Which alternative would you go for? It's for my attempt to create an ultraminimal Rails 6 blog example: https://github.com/1234dev/myblog
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
im0nde has joined #ruby
im0nde_ has quit [Ping timeout: 272 seconds]
cc__ has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cc_ has quit [Ping timeout: 272 seconds]
mossplix has joined #ruby
voker57 has quit [Remote host closed the connection]
turbo_choo has quit [Remote host closed the connection]
voker57 has joined #ruby
turbo_choo has joined #ruby
mossplix has quit [Remote host closed the connection]
cc__ has quit [Remote host closed the connection]
zdm has quit [Remote host closed the connection]
zdm has joined #ruby
<gitter1234>
I think I'll go ahead and ditch the second RESTful solution as 1. it looks way more complicated than it has to be, 2. it was pretty much imposed on me by some guy in the Slack channel which has since gone AWOL, 3. everybody I show it to go like "why? what was wrong with the first solution?"
RiPuk has quit [Read error: Connection reset by peer]
dinfuehr has quit [Ping timeout: 240 seconds]
RiPuk has joined #ruby
dinfuehr has joined #ruby
mossplix has joined #ruby
dinfuehr has quit [Ping timeout: 240 seconds]
regedit has quit [Quit: Connection closed for inactivity]
dinfuehr has joined #ruby
tvw has quit [Ping timeout: 272 seconds]
jintseng has quit [Ping timeout: 265 seconds]
r3m has quit [Quit: WeeChat 2.8-dev]
r3m has joined #ruby
tau has quit [Remote host closed the connection]
vondruch has joined #ruby
conta has joined #ruby
fphilipe_ has joined #ruby
pandakekok9 has joined #ruby
TomyWork has joined #ruby
<gitter1234>
Is there no easier way to express this? `resources :posts do, only: [:create, :edit, :update, :destroy]; resources :comments, only: [:create, :edit, :update, :destroy]; end`
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
leah2 has quit [Ping timeout: 260 seconds]
mossplix has quit [Remote host closed the connection]
william1 has joined #ruby
leah2 has joined #ruby
mossplix has joined #ruby
weeirc8087 has joined #ruby
sh7d has quit [Ping timeout: 268 seconds]
turbo_choo has quit [Ping timeout: 268 seconds]
turbo_choo has joined #ruby
tpanarch1st_ has quit [Ping timeout: 255 seconds]
mikecmpbll has joined #ruby
william1 has quit [Ping timeout: 272 seconds]
code_zombie_ has quit [Quit: Leaving]
SoF has joined #ruby
SoF has quit [Client Quit]
SoF has joined #ruby
SoF has quit [Client Quit]
alexherbo25 has joined #ruby
alex`` has quit [Ping timeout: 258 seconds]
alexherbo2 has quit [Ping timeout: 268 seconds]
alexherbo25 is now known as alexherbo2
davispuh has quit [Ping timeout: 258 seconds]
SoF has joined #ruby
alex`` has joined #ruby
SoF has quit [Client Quit]
davispuh has joined #ruby
mossplix has quit [Remote host closed the connection]
jmcgnh has quit [Read error: Connection reset by peer]
zdm has quit [Remote host closed the connection]
zdm has joined #ruby
jmcgnh has joined #ruby
william1 has joined #ruby
alexherbo21 has joined #ruby
alex`` has quit [Ping timeout: 258 seconds]
alexherbo2 has quit [Ping timeout: 258 seconds]
alexherbo21 is now known as alexherbo2
alex`` has joined #ruby
suukim has quit [Remote host closed the connection]
conta has quit [Quit: conta]
bukkitgerman has joined #ruby
akem__ is now known as ChewBaka
ChewBaka is now known as akemhp
DaRock has quit [Read error: Connection reset by peer]
DaRock has joined #ruby
d^sh has joined #ruby
jokester has joined #ruby
d^sh has quit [Ping timeout: 268 seconds]
xco has joined #ruby
DaRock has quit [Read error: Connection reset by peer]
DaRock has joined #ruby
normanrockwell has joined #ruby
sagax has joined #ruby
AJA4350 has joined #ruby
normanrockwell has quit [Quit: Leaving...]
pandakekok9 has quit [Quit: End the suffering of the Filipino people! Overthrow the fascist Duterte regime! Destroy semi-feudalism and bureaucratic capitalism! VIVA CPP-NPA-NDF!]
alexherbo2 has quit [Ping timeout: 268 seconds]
alex`` has quit [Ping timeout: 260 seconds]
troulouliou_dev has joined #ruby
helpa has quit [Remote host closed the connection]
zipkid has quit [Read error: Connection reset by peer]
jhill has quit [Ping timeout: 258 seconds]
gorsuch has quit [Read error: Connection reset by peer]
rann has quit [Read error: Connection reset by peer]
Milos has quit [Remote host closed the connection]
jetpack_joe has quit [Write error: Connection reset by peer]
gsingh93 has quit [Ping timeout: 258 seconds]
jetpack_joe has joined #ruby
Sina has joined #ruby
rann has joined #ruby
Lyubo1 has quit [Ping timeout: 268 seconds]
NODE has quit [Remote host closed the connection]
jhill has joined #ruby
Yuyu0 has quit [Ping timeout: 258 seconds]
Milos has joined #ruby
helpa has joined #ruby
helpa has quit [Remote host closed the connection]
donofrio has joined #ruby
helpa has joined #ruby
NODE has joined #ruby
mr_rich101 has joined #ruby
lurkless has quit [Ping timeout: 258 seconds]
gsingh93 has joined #ruby
Lyubo1 has joined #ruby
lurkless has joined #ruby
NODE has quit [Client Quit]
NODE has joined #ruby
NODE has quit [Client Quit]
NODE has joined #ruby
turbo_choo has quit [Ping timeout: 240 seconds]
tvw has joined #ruby
Jonopoly has joined #ruby
suukim has joined #ruby
mossplix has joined #ruby
william1 has quit [Quit: WeeChat 1.9.1]
mossplix has quit [Remote host closed the connection]
mossplix has joined #ruby
tvw has quit []
anveo has joined #ruby
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
alexherbo2 has joined #ruby
Eiam has quit [Ping timeout: 260 seconds]
alex`` has joined #ruby
mossplix has quit [Remote host closed the connection]
cd has joined #ruby
NODE has quit [Quit: changing servers]
sergioro has quit [Quit: leaving]
NODE has joined #ruby
turbo_choo has joined #ruby
lucasb has joined #ruby
lmat has joined #ruby
<lmat>
I have a rails controller that is hanging. I'm running an integration test. The line that hangs is get transactions_path (no params). The def index function executes and returns, but return never comes back to the controller...it's hanging somewhere in there. The logs say Rendered transactions/index.html.erb within layouts/application (3.0ms) Rendered layouts/_loader.html.erb (0.1ms)
<lmat>
Then when I ^c, it says Rendered layouts/_sidebar.html.erb (19553.6ms) (I waited 20 seconds before hitting ^c) then Completed 500 Internal Server Error in 21729ms (ActiveRecord: 0.5ms)
<lmat>
The internet doesn't seem to know about this problem?
<lmat>
Aha! I think it's hanging in a ERB file on <img src=<%= asset_path "logo.png"%>
mossplix has joined #ruby
clemens3 has joined #ruby
toomus_ has joined #ruby
<toomus_>
hi all
<toomus_>
I have a question
<toomus_>
In my Rails app all class and modules name with uppercase parts have names changed to camel case when app starts
<toomus_>
eg SomeCSV changes to SomeCsv
<toomus_>
what is going on? :)
toomus_ has quit [Remote host closed the connection]
mossplix has quit [Remote host closed the connection]
<havenwood>
I mean other way around. Okay, I fold, I need coffee!
hramrach has joined #ruby
ttoocs has quit [Ping timeout: 240 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
stryek has joined #ruby
mossplix has quit [Remote host closed the connection]
<havenwood>
adam12: just the smell of coffee makes me realize I don't need NOTHING. :P
<havenwood>
nil works >.>
<havenwood>
oh, maybe i do need it, since an explicit nil is different in that it's the first return value?
anveo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood>
unsure now
<havenwood>
my least favorite thing about Enumerators:
<havenwood>
&>> e = [42].cycle; e.next; Thread.new { e.next }
<rubydoc>
stderr: playpen: application terminated abnormally with signal 31 (Bad system call) (https://carc.in/#/r/8fjh)
<havenwood>
#!> fiber called across threads (FiberError)
<gitter1234>
adam12: how'd you arrive at that avatar solution yesterday?
<gitter1234>
it was wicked
<gitter1234>
wiki wiki wild wild :D
<adam12>
gitter1234: I think it was just intuition. I had a feeling it had to be a StringIO object (I think I even hinted at it while we were debugging).
<adam12>
gitter1234: I'd have expected the blob_for method to return a StringIO object.
<gitter1234>
Yep, i recall you mentioning IO. i never took the hint though
<gitter1234>
I submitted the solution to the author and asked him to add it to his readme so those who come after me don't have to go through the same trouble
<adam12>
gitter1234: If you're not already doing so; agressively use the REPL. Rails console and binding.pry where you want to debug something. It's incredibly powerful and not something many other languages offer.
<lmat>
I would think it's common for views (erb) to contain calls to asset_path (I think that call is pretty much only found in views), but what happens when an Integration test for a controller tries to call it?
<lmat>
In my case, one processor goes to 100% and the test hangs :(
mossplix has joined #ruby
davidw has joined #ruby
davidw has quit [Changing host]
davidw has joined #ruby
dinfuehr_ has joined #ruby
dinfuehr has quit [Ping timeout: 268 seconds]
<adam12>
lmat: Sounds like an infinite loop of some sort.
<adam12>
lmat: I'd try isolating it to one line by commenting out chunks of Ruby lines in your view files. Once you figure out what the line is, look at what's happening there.
<lmat>
adam12: I think I got the line. I have a logging statement before the asset_path call and a logging statement after.
<adam12>
lmat: What's the line look like?
<lmat>
I tried to log the output to asset_path and that hangs, too. Rails.logger.warn "asset path is " + asset_path "logo.png"
<lmat>
Here's the line that hangs: <div class="logo"><img src=<%= asset_path "logo.png" %> alt=""></div>
<lmat>
This also hangs: <% Rails.logger.warn "asset path is " + (asset_path "logo.png") %>
<adam12>
lmat: Is this a new project or are you working on a pre-existing project?
<lmat>
adam12: pre-existing :(
<adam12>
lmat: Maybe asset_path has been messed with.
<adam12>
lmat: do you see anybody redefining asset_path anywhere? `grep 'def asset_path'` or something?
<lmat>
great question!
ellcs has quit [Ping timeout: 268 seconds]
<adam12>
lmat: or setup a binding.irb call before your debug lines and check the owner. `method(:asset_path).source_location`
<lmat>
greap asset_path . -r; shows only calls, no defs.
<lmat>
adam12: yes, will do.
<lmat>
adam12: But you suggested pry before so now I use pry ^_^
<adam12>
lmat: Yeah. `? asset_path` and see what it says.
schne1der has quit [Ping timeout: 260 seconds]
<lmat>
<% binding.pry %> didn't break...
<lmat>
Oh wait
<lmat>
I wasn't calling the right view.
<lmat>
? asset_path gave a lot... I'm guessing it's legit because a redef wouldn't have that much docs :-)
dinfuehr_ has quit [Ping timeout: 260 seconds]
<lmat>
From: /usr/local/bundle/gems/actionview-5.2.3/lib/action_view/helpers/asset_url_helper.rb @ line 122: looks promising
mossplix has quit [Remote host closed the connection]
<lmat>
I've tried stepping into asset_path, but it's not very productive.
TomyWork has quit [Ping timeout: 256 seconds]
<adam12>
lmat: Nah that looks fine. I'd just trust that Rails is doing what it's supposed to.
<adam12>
lmat: What happens when you call `asset_path "logo.png"` when you break in pry?
mossplix has joined #ruby
dinfuehr has joined #ruby
<lmat>
hangs
<adam12>
lmat: You might have no choice but install pry-byebug or byebug and just step through asset_path.
cthulchu_ has joined #ruby
<lmat>
adam12: stepping.
<lmat>
I'm just using pry though
bodqhrohro has quit [Quit: ZNC 1.6.5+deb1 - http://znc.in]
bodqhrohro has joined #ruby
<adam12>
lmat: Pry doesnt' support stepping by default IIRC so I _presume_ you're using pry-byebug and just don't know it. You could confirm this by looking at your Gemfile.
<lmat>
inside /usr/local/bundle/gems/sprockets-rails-3.2.1/lib/sprockets/rails/helper.rb I typed next on raise_unless_precompiled_asset asset.logical_path unless allow_non_precompiled and it's hanging.
<lmat>
adam12: Oh yeah, I might have done that!
<lmat>
adam12: That sounds familiar.
dinfuehr has quit [Ping timeout: 265 seconds]
ttoocs has joined #ruby
<adam12>
lmat: No suggestions. Maybe try Google; or dig through config/ and see if anything surrounding asset configuration looks out of place.
<lmat>
adam12: Thanks for your time! I've sure been checking google. My guess is that if this is common, it would be hit any time an Integration Test was used...which SHOULD be all the time... ;-)
dinfuehr has joined #ruby
<adam12>
lmat: It definitely sounds like someone has changed / misconfigured something. It wouldn't be broken when Rails shipped that version.
fphilipe_ has quit [Ping timeout: 265 seconds]
<lmat>
adam12: yeah, makes sense.
ttoocs has quit [Ping timeout: 272 seconds]
DaRock has quit [Ping timeout: 265 seconds]
<lmat>
adam12: I think usually my app renders application.html.erb and it has a "yield" in it where whatever is being requested should show up. (Does that make sense?)
<adam12>
lmat: Yes. That's normal.
<lmat>
adam12: Now I'm testing a password_reset route, and it doesn't appear to be loading up the application.html.erb. I guess it's using a less-rich base template, but how do I figure out which one it's using?
<lmat>
The log says, "password_resets/new.html.erb" but that's just a snippet (I forget what rails calls them... partials?)
<adam12>
lmat: Partials start with an _. There's no way that's a partial.
<lmat>
aaaahhhh!
tankf33der has left #ruby [#ruby]
<lmat>
It starts with <h1>, but I don't doubt that it is poorly written!
<lmat>
(should start with <html> or some such, right?)
<adam12>
lmat: You can control the layout used in the controller. It's a class method (layout :foo), and I believe you can specify it when you call `render`. But I dont remember. Check Rails rendering guide if there is one.
<lmat>
ahh, I'll look there, thanks!
<lmat>
layout 'login' Thanks!
<lmat>
(this one is hanging, too, maybe I can learn more by debugging here, too)
mn3m has joined #ruby
<lmat>
Now it's hanging on <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> ......
<lmat>
You know, this is probably also calling asset_path to get the stylesheet assets...
<adam12>
lmat: I'd bet you're correct.
<lmat>
yup, stepped and stepped and I'm back to asset_path
<lmat>
(this time for asset "application" whatever that it)
<lmat>
s/it/is
alexherbo25 has joined #ruby
alex`` has quit [Ping timeout: 258 seconds]
alexherbo2 has quit [Ping timeout: 268 seconds]
alexherbo25 is now known as alexherbo2
alex`` has joined #ruby
<lmat>
(checking version numbers for compatibility)
ua has quit [Ping timeout: 240 seconds]
ttoocs has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
clemens3 has quit [Quit: WeeChat 2.1]
ttoocs has quit [Ping timeout: 240 seconds]
zdm has quit [Read error: Connection reset by peer]
<gitter1234>
(forgot to add error message to gist)
ZAJDAN1 has quit [Ping timeout: 258 seconds]
<lmat>
gitter1234: What are you wanting to happen and what's actually happening?
zdm has joined #ruby
<lmat>
gitter1234: Oh yeah also what are you doing?
<gitter1234>
Well basically only users approved by admin is allowed to post on the blog. Admin should be able to access a users#index where she gets a list of users and can click a button for approval/removal of approval.
<gitter1234>
Current progress should be documented in the gist. Let me know if something is missing.
ZAJDAN1 has joined #ruby
ZAJDAN2 has quit [Ping timeout: 268 seconds]
mossplix has quit [Remote host closed the connection]
davor_ has joined #ruby
<gitter1234>
* Admin should be able to access `users#index` where she can click a button to approve/remove approval.
davor has quit [Ping timeout: 258 seconds]
davor_ is now known as davor
orbyt_ has joined #ruby
sameerynho has joined #ruby
suukim has quit [Quit: Konversation terminated!]
mossplix has joined #ruby
ttoocs has joined #ruby
mossplix has quit [Ping timeout: 260 seconds]
tvw has joined #ruby
ttoocs has quit [Ping timeout: 260 seconds]
cliluw has joined #ruby
<NL3limin4t0r>
I currently have time, but have you already taken a look at the generated routes and helpers? `bundle exec rails routes` prints a list off all routes that include the helper methods.
<NL3limin4t0r>
gitter1234: ^
mn3m has quit [Remote host closed the connection]
ZAJDAN2 has joined #ruby
<NL3limin4t0r>
I currently don't have the time*
wildtrees has joined #ruby
zhando has joined #ruby
<NL3limin4t0r>
nvm, didn't scroll down to the bottom
<NL3limin4t0r>
you've already included those in the gist
ZAJDAN1 has quit [Ping timeout: 260 seconds]
ZAJDAN1 has joined #ruby
<zhando>
first time in #ruby in a looong time... lots of folks here.. guess there's no discord yet
ZAJDAN2 has quit [Ping timeout: 268 seconds]
<NL3limin4t0r>
zhando: irc is timeless, with discord you rely on the avaiablility of a client on a certain platform
<zhando>
NL3limin4t0r: I agree..
weeirc8087 has joined #ruby
nowhere_man has quit [Ping timeout: 272 seconds]
fphilipe_ has joined #ruby
<zhando>
first time I've had an itch to code in ruby for a while.. anyone ever use main a lot?
<zhando>
the gem main..
* timeless
looks up
<NL3limin4t0r>
gitter1234: It seems that for some reason `resources :approvals, only: [:edit, :update]` isn't picked up. Have you already restarted your server?
* timeless
likes to think of irc as ephemeral
rippa has joined #ruby
<NL3limin4t0r>
timeless: Didn't thought there would be a user timeless in the chat. My bad.
fphilipe_ has quit [Ping timeout: 260 seconds]
<zhando>
I'm using this gem main and I'm liking it right up to the point it stomps on TTY::Prompt..
<zhando>
So I switch to using slop and slop does the same thing.. yikes.. so I go back to main and hack past using a prompt..
<zhando>
greedy gems.. they don't play nice with others.. Or is that just life in ruby land?
<adam12>
zhando: I've been using cri. I pair it with TTY::Prompt in some bootstrapping scripts (ie. to get a web app ready for a developer).
Ai9zO5AP has joined #ruby
ttoocs has joined #ruby
<zhando>
adam12: thanks for the tip.. just what I came here for..
<adam12>
zhando: yw.
<NL3limin4t0r>
Although I've never used it myself there is also "thor" which also seems quite popular.
<zhando>
NL3limin4t0r: I've used thor for one or two scripts and then started using a gem inspired by thor called boson.. I thought of using boson but it seemed to dictate subcommands like: cmd submd params.. no way to just cmd params like main..
schne1der has joined #ruby
<gitter1234>
Hey there NL3limin4t0r_afk, had to run to the store real quick
<gitter1234>
yep tried restarting. i realize this is all rails 101 stuff and that i should read the entire rails guide ASAP. i just wanna get this blog outta the way so i can move onto building my actual app. A Tinder clone :D
ZAJDAN1 has quit [Remote host closed the connection]
ZAJDAN1 has joined #ruby
fphilipe_ has joined #ruby
<gitter1234>
With a superior UI. And tons of sweet https://animejs.com/ animations.
<zhando>
hmmm.. maybe I'll use thor next time..
fphilipe_ has quit [Ping timeout: 272 seconds]
<adam12>
I'd probably pass on Thor...
sauvin has quit [Ping timeout: 272 seconds]
troulouliou_dev has quit [Quit: Leaving]
<adam12>
gitter1234: If you were looking to get unblocked: drop the ApprovalsController and just use an approve action in your UsersController. I don't think you need the ceremony of a seperate controller, at least right now.
<gitter1234>
adam12: agreed.
greengriminal has quit [Quit: This computer has gone to sleep]
mossplix has joined #ruby
<adam12>
gitter1234: You're looking for 'member :approve' or 'members :approve' in your routes. I don't remember which. Inside there, you'll get an :id for user. So just user = User.find(params[:id]); user.update(approved: true); redirect_to somewhere.
<zhando>
thanks folks.. gtg
zhando has quit [Quit: ERC (IRC client for Emacs 26.3)]
Tempesta has quit [Quit: See ya!]
ttoocs has joined #ruby
cthulchu_ has quit [Read error: Connection reset by peer]
cthulchu_ has joined #ruby
ttoocs has quit [Ping timeout: 272 seconds]
mossplix has quit [Remote host closed the connection]
weeirc8089 has joined #ruby
weeirc8087 has quit [Ping timeout: 265 seconds]
visage_ has joined #ruby
Emmanuel_Chanel has quit [Read error: No route to host]
<gitter1234>
adam12: hell yeah! users#index now displaying like it should!
<gitter1234>
and since i used it there i was hoping i wouldn't have to use it for button_to as well but nevermind
ZAJDAN2 has joined #ruby
<gitter1234>
action has been changed. let's gooooooo!
<akemhp>
With this: require 'io/console'; puts "input: \"#{STDIN.getch.ord}\""; #### i always get 27 for char like up/down arrows or 'begin/end' or FX keys, sometimes nothing also. On Linux. Any way like getch() to get keysym value in console in ruby?
<akemhp>
ord() is probably not what i'm looking for, and maybe getch can't get theses keys values, i don't know.
dionysus69 has joined #ruby
ZAJDAN1 has quit [Ping timeout: 268 seconds]
ZAJDAN1 has joined #ruby
ttoocs has quit [Ping timeout: 260 seconds]
weeirc8089 has quit [Ping timeout: 265 seconds]
<gitter1234>
adam12 :)
<gitter1234>
thanks a lot fam
ZAJDAN2 has quit [Ping timeout: 268 seconds]
<gitter1234>
started from the bottom now we here! with the simplest, most straight-forward Rails 6 blog possible :-)
<adam12>
gitter1234: Cheers. Now go read those guides!
<gitter1234>
hehe
houhoulis has joined #ruby
<adam12>
akemhp: 27 is going to be the escape character. You'd need to loop a few more times to get the full escape sequence.
<akemhp>
adam12, Okay! i didn't think about that of course, thanks a lot!