Questions tagged as 'ruby-on-rails'

1
answer

rails 5.2.0 'method_missing': undefined method 'has_one_attached'

My project uses Rails 5.2, Ruby 2.4.1p111. rails 5.2 comes with active_record "preinstalled", I ran the rails active_storage:install that generated the migrations, then rails db:migrate everything right, in the Category.rb model I...
asked by 08.05.2018 / 19:47
0
answers

Selection in source and destination lists

I'm starting RoR and I have a similar situation to using GEM Cocoom, the difference is I already have the data in the two tables related. And I would like to work with selection between source and destination lists. I call it the shelf. I have i...
asked by 04.05.2018 / 14:29
1
answer

Getting nested resources from the Rails controller

Good evening, this is my first post here, I'm learning to use the tool, sorry if I did something wrong. But here's the problem ... I'm trying to make a "Trello" clone in Rails for a college discipline. Basically I have one in the Project model...
asked by 04.05.2018 / 01:49
1
answer

Nokogiri put tags with separation

teste = Nokogiri::XML::DocumentFragment.parse("") Nokogiri::XML::Builder.with( teste ){ |x| x.exemplo "teste xml" } puts teste.to_xml Message you printed <exemplo>teste xml</exemplo> Message as desired <ns:exemplo&...
asked by 03.05.2018 / 21:43
0
answers

Loan logic in a library

I'm wanting to make a loan from a library book loan, I made a scaffold for book one for user and one for loan. In the list of books in each book has a button to lend when I click it takes the id and the name of the book for the loans, in l...
asked by 09.05.2018 / 19:23
1
answer

Helper operation collection_select

Hello, I'm new to rails and would like to know how the rails collection_select helper works, I was not able to deduce based on the explanations and examples in the official documentation. collection_select(:post, :author_id, Author.all, :id, :...
asked by 24.04.2018 / 16:42
1
answer

Action for a lend button in rails

I'm starting right now in ruby on rails and I'm having a question I need to make a library, I created and I am listing the books, I also created a button to borrow in each book unit and there it is my problem I want to make this button to be cli...
asked by 26.04.2018 / 14:53
0
answers

Error Bundle install

Every time I press bundle install this error appears. /usr/local/bin/bundle:23:in 'load': cannot load such file -- /usr/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/exe/bundle (LoadError) from /usr/local/bin/bundle:23:in '<main>'...
asked by 17.04.2018 / 14:34
1
answer

Gem Wicked_pdf - page break repeats the first row of the table

When you have a table and the records do not fit on a single page, on the new page wicked_pdf repeats the first line by disrupting the second page reading. How do I not display this first line? (Curriculum Components - Module 1).     
asked by 16.04.2018 / 17:01
0
answers

Lightbox with rails admin

Well, I'm trying to implement a way to "enlarge" the product image when it's clicked. I've seen some tutorials, gem's and nothing works. From what I researched would be what the Lightbox jquery does. Has anyone had to do this and know a way to h...
asked by 08.04.2018 / 20:09