How to add flex project to rails project?

I’m starting to learn in flex and ruby on rails.
I see some projects there is a flex folder under rails_project/app which
contains controller,
models, views. I think it’s not mannually to add these folders to rails

How to do that?