Jiri Prochazka

Joined

130 Experience
0 Lessons Completed
0 Questions Solved

Activity

Posted in Extending Rails flash

And another question - is there an easy way to access flash from lib?

Posted in Extending Rails flash

I have in app/lib/action_dispatch/flash/flash_hash.rb file this code:

class ActionDispatch::Flash::FlashHash
  def my_method
    #...
  end
end

but when I call it in controller, I get undefined method 'my_method' for ActionDispatch::Flash::FlashHash:0x007fcf8e81e510:

def index
  flash.my_method
end

Why? Any ideas?

Thanks

Posted in Running multiple Rails versions

Ok man, cool, thanks!

Posted in Running multiple Rails versions

ok, thanks.
But I have Rails 5.0.1 gem already installed. How can I install the newer gem version withou updating the old one?
Can I run multiple gem versions alongside each other?

Posted in Running multiple Rails versions

Hi guys (and ladies if any),

I have installed Rails with rbenv (recommended), but now because of significant changes between 5.0.1 and 5.1 versions, I want to start a new project with 5.1 (because I'm going to havily use javascript), but keep also my older projects running on 5.0.1.

And now what? Do I have to smehow uninstall Rails for rbenv and install it for rvm, or can I just "replace" it??

What about the setting of older projects when switching to rvm? Do the projects need to be updatesd somehow (configuration etc.)?

Thanks

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

© 2024 GoRails, LLC. All rights reserved.