RoR - dynamic dropdown with checkboxes | Fixed issues |
- RoR - dynamic dropdown with checkboxes
- Testing HTTP and HTTPS on Cucumber Ruby
- Creating many albums using ActiveRecord
- NameError in PostsController#create undefined local variable or method `post_params' for #<PostsController:0x007fd289176ae8>
- Can I use Whenever Gem with a Module Method in Rails
- Deploy Error - psych.rb:205:in `parse': (<unknown>): mapping values are not allowed in this context at line 1 column 6 (Psych::SyntaxError)
- Access first X elements in a Class (Ruby / Rails)
- Partial date in Rails
- I18n how to get translated model name in views
- Should I make most of my rails/react app in react components?
- No implicit conversion of Symbol into Integer. A error still no solution for me
- I have a code to convert HTML to word doc using Rails. But when I download the word doc, the styles are not applying. Any suggestions please?
- Do sass/scss files compile to render the final css file on production on each user page load?
- Setting up Elasticsearch on Nitrous.io
- Setting up Ruby along with android in docker
- Cannot push to Heroku: "Could not find rake-11.1.2 in any of the sources"
- ID not being found in DOM when both create and destroy are AJAX
- Why does this RSpec example require "let!" instead of "let"?
- Using Ransack in Rails, how can I prevent extensive processing from a user defined search query?
- Rails Tutorial (M. Hartl) Chapter 9 (9.2.1 : Requiring logged user) Error: undefined method `user_id'
- Unix domain or TCP
- rails device not keeping GET params
- How to build a dynamic model in rails?
- Rails importing mixins in application scss not working [duplicate]
- File to import not found or unreadable: fontawesome
- what does mean's aasm column in rails
- Heroku gem shows up despite having heroku toolbelt
- Use instance variable in "delete_if" method in ruby on rails
- Rails how to force download on chrome ios
- How to integrate Paypal integration in Ruby on Rails
RoR - dynamic dropdown with checkboxes Posted: 18 Apr 2016 06:50 AM PDT I am looking to implement a dynamic dropdown with checkboxes in it so the sender of a message can choose multiple receivers. Currently I just have a list of recipients under the message textarea. _recipients.html.erb: User.rb: recipient.rb: messages_controller.rb: Is it possible to get the checkboxs and names in to a dropdown with collection_select for example? Happy to provide more code if required. Thanks. |
Testing HTTP and HTTPS on Cucumber Ruby Posted: 18 Apr 2016 06:50 AM PDT I am trying to fix a bug and the impossibility to reproduce it on my local environment is becoming a problem. Cucumber might be able to help, but I couldn't find a way to make cucumber work for me. It is specifically about HTTP and HTTPS. I use 4 different environments. Only production and the one below are HTTPS ones and my bug only happens there exactly because of the protocol/URL generation. Is there a way to make cucumber work under HTTPS for a specific feature? I hope it was clear enough, although I think it is still a bit vague. |
Creating many albums using ActiveRecord Posted: 18 Apr 2016 06:58 AM PDT It's a rake task which searches for an artists and if it exists it will store it with artists albums. I've tried to use a gem but for some reason the gem returns something I don't really need. If I search an artist it works fine though. will return this: which is not what I need at all. Here's what I should get. So I decided to code it myself and then I realized that it saves an empty model, everything in my Album is nil. 2 questions: 1) How can I fix it? 2) How can I save ALL albums, not just one? |
Posted: 18 Apr 2016 06:53 AM PDT Posts Controller |
Can I use Whenever Gem with a Module Method in Rails Posted: 18 Apr 2016 07:00 AM PDT I've created a very small application in rails where I've created a module method in /lib to handle the logic. I've also set up Whenever to run that Module Method at set times. I've followed both the readme from Whenever and these previous posts to hopefully set things up correctly. When looking at the readme though the examples are quoted like this: My question therefore is does whenever have to reference a method in the model? or can it reference a module method in /lib? Looking at this post it seems to allude to having to have the method in the model. My problem is that I don't have a database and so no models. Any help would be appreciated. |
Posted: 18 Apr 2016 06:37 AM PDT Due to network timeout, it seems the deployment couldn't complete and I had to CTRL + C to rollback. Now when I am trying to deploy again, it is giving below error. I am unsure why this is happening since nothing has been changed/edited either locally or on server. It looks like some setting of Capistrano got corrupted/ Can you suggest what options I have to fix this ? The deploy.rb file looks fine since I have used it till now for all the deployment. There is no problem with whenever too. |
Access first X elements in a Class (Ruby / Rails) Posted: 18 Apr 2016 06:51 AM PDT I've tested a couple of methods for printing the first 3 instances of my class for a Ruby on Rails application. I've already got the following working : But I'm trying to do the same thing but only printing the first 3 elements of the @posts variable. .first(3) and .find(:id) haven't worked and I'm at a loss on how to iterate through the class variables. Thanks. |
Posted: 18 Apr 2016 06:35 AM PDT I have a |
I18n how to get translated model name in views Posted: 18 Apr 2016 06:26 AM PDT I have a header in a page where I would like to appear something like this: 'Aanpassen bewoner' 'Aanpassen gebruiker' 'Aanpassen' is dutch for Edit. 'bewoner', 'gebruiker' are translated class names of Senior, User. I have translated the active record classes in the file like this: Is there a way to write the header once in the views (or in helper class) so it takes the model it currently is showing and shows the translation? Ideally I would only have one line of code which I could use in all edit views of all classes (as long as they are translated of course). |
Should I make most of my rails/react app in react components? Posted: 18 Apr 2016 05:52 AM PDT I'm building a rails app using the Is this bad practice? Does it make my website slower because I'm making extra javascript files? Or does it make my website less visible through search engines? I will eventually move onto make this a single page application (using |
No implicit conversion of Symbol into Integer. A error still no solution for me Posted: 18 Apr 2016 06:58 AM PDT I have a view with checkboxes and input text. I checked one checkbox and digit value on input, after submit. But have two problem... A error on params and don't save the values on my table, this is my code: refinancings_controller.rb My console this is: This is a first error: The other error is don't show params situation... |
Posted: 18 Apr 2016 05:44 AM PDT I have a code which converts my HTML code to word doc using Rails. But when I download the word doc, thein-line styles are not applying. Any suggestions please? |
Do sass/scss files compile to render the final css file on production on each user page load? Posted: 18 Apr 2016 06:09 AM PDT I am creating a ruby on Rails app with the usual tools (rails pipeline and rails sass (gem 'sass-rails') and deploy to Heroku. I am a newbie and what I fail to understand with scss/sass is:
I can cope with the larger compile time while in dev mode not in production (I'd rather avoid it). At least I need to know if even in production, the css given as example below, will need to go and fetch the scss files Exemple: |
Setting up Elasticsearch on Nitrous.io Posted: 18 Apr 2016 05:33 AM PDT Does anyone know how to set up elasticsearch and get it running within Nitrous.io - they've removed their autoparts function which installed it very nicely & neatly for you. Right now it's not present on my IDE when I try and query it so I'm guessing it's not even installed? Thanks |
Setting up Ruby along with android in docker Posted: 18 Apr 2016 05:29 AM PDT I have an issue while setting up docker container with android and ruby environment to run calabash test. I have this docker file for the android part. Whenever I am editing the docker file to install the latest version of ruby and for calabash just like below code I am getting error just like
And after that I have tried like syntax to check whether it is gonna work and seems like not. Is there any way to install both? |
Cannot push to Heroku: "Could not find rake-11.1.2 in any of the sources" Posted: 18 Apr 2016 05:22 AM PDT |
ID not being found in DOM when both create and destroy are AJAX Posted: 18 Apr 2016 05:26 AM PDT I'm running into an issue where I allow my user to create an item, but they can also delete the item from the same page. Currently when a user adds an item, it's added to the site through The reason is that if I run $('item-13') f.ex in my console, it's not found in the DOM because it was added through AJAX. So the issue I'm having is that in my with my destroy action: how can I make it so that I'm able to find the id I've attached to the div that displays the item when it's created? After I reload the page I'm able to delete the div based on AJAX. |
Why does this RSpec example require "let!" instead of "let"? Posted: 18 Apr 2016 05:39 AM PDT I was able to make the test work with the following code, but it seems to be weird and I don't totally understand it. Can somebody tell me if creating the objects this way is the optimal one? Why do I have to only use post_comment.rb post_comment_spec.rb |
Using Ransack in Rails, how can I prevent extensive processing from a user defined search query? Posted: 18 Apr 2016 04:54 AM PDT I've set up a page in my rails application for a user to define criteria to perform a search using Ransack. However, I've noticed that if I build a short criteria list such as, |
Posted: 18 Apr 2016 04:48 AM PDT On chapter 9.2 of Hartl's Ruby on Rails Tutorial, I'm getting this 2 errors on the rake test after i made the test for redirecting user when they try to edit or update a profile that isn't theirs : The errors messages points to line 24 in my test_helper and line 28,36 in my users_controller_test : test_helper.rb : Line 18 would be at "remember_me" in the "log_in_as" method. user_controller_test.rb : Line 28 would be at "log_in_as(@other_user)" in test "should redirect update when not logged in" and 36 at "log_in_as(@other_user)" in test "should redirect update when logged in as wrong user". and this is the fixture file where :archer and :michael are stored(test/fixtures/users.yml): |
Posted: 18 Apr 2016 04:38 AM PDT I have a fairly simple Rails app that connect to Postgres server (locally). Uptil now, I was under the impression if not specified (socket in the database.yml) the pg client connect with postgres over TCP on a loopback interface. Fyi,this is how my configuration looks like. But I think I was wrong I can't sniff any packet over the loopback interface at port 5432.
Which is letting me believe that it working over Unix domain socket. So, is there a fairly reliable way to determine ... Whether I'm connected to TCP socket or Unix socket? |
rails device not keeping GET params Posted: 18 Apr 2016 05:24 AM PDT I have one running rails app with device gem. I want pass some urls with params (in url) in email. when user click on it and if user is logged in everything works (ULR is like myhost.com/myaction?my_var=xx) but if user is not logged in it redirects to sign in path. after giving credentials it lost my_var value and app breaks. (yes it goes to my action) for now I am redirecting user to his dashboard with error msg but anyone have good solution? |
How to build a dynamic model in rails? Posted: 18 Apr 2016 04:31 AM PDT I am building an editable user-form using Ruby on Rails. I currently have a model to store the question title and a separate model to store options for each question. The form has a list of all the questions and for each question, the user can view the form in a drop down list. My problem is that I want to create a model for a user that can select an option for each questions and I want to store these options for each user in the database. If the manager deletes a question from the questions table, then the user form will not have that question. And I am displaying a form to the user showing these questions by means of a form: But I do not know how to create a model to store answer for all the questions for different users of the system. Can someone suggest how to create such a dynamic model? |
Rails importing mixins in application scss not working [duplicate] Posted: 18 Apr 2016 04:29 AM PDT This question already has an answer here: I have the following in and then in and then in Why is this saying undefined mixin |
File to import not found or unreadable: fontawesome Posted: 18 Apr 2016 04:41 AM PDT When I worked on mac yosemite everything works fine but when I've installed el capitan something go wrong. I mean I've installed all gems in rails application, and when I run it: Gemfile has: and at the application.sass: |
what does mean's aasm column in rails Posted: 18 Apr 2016 04:10 AM PDT I am new in rails and I am doing one project which has this code what does aasm_column means and what is the banalities to do this |
Heroku gem shows up despite having heroku toolbelt Posted: 18 Apr 2016 04:22 AM PDT in my project folder, when I run |
Use instance variable in "delete_if" method in ruby on rails Posted: 18 Apr 2016 03:57 AM PDT I am using |
Rails how to force download on chrome ios Posted: 18 Apr 2016 05:32 AM PDT I have a controller action like below. The idea is to force download instead of viewing on the browser. It works pretty well on desktop both chrome, firefox and ie. However, it doesn't work on chrome mobile ios at all. By the way, the file is very small, so I did via |
How to integrate Paypal integration in Ruby on Rails Posted: 18 Apr 2016 03:13 AM PDT I am integrating payment module for the first time. I want to integrate 1) integration with Paypal (Difficult one) 2) 3) Stripe (Looking Easy) Which one is better? I want to use stripe but is it support paypal ? It is available in every country? Please guide me and don't ask to search on google. NOte : Better meanz easier to implement |
You are subscribed to email updates from Newest questions tagged ruby-on-rails - Stack Overflow. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment