Data dodania Pytanie
2017-01-11 22:01 rails has_many through with 5 tables »
I would like to know if is a good practice create a has_many through with more than 2 tables. for exemple: I have class Color < ActiveRecord::Bas...
(0) odpowiedzi
2017-01-11 16:01 Ruby on Rails: Using functions to retrieve data from model »
In my RoR application I am trying to display information from associated tables on a view. I have tables with data such as this: Email id subje...
(1) odpowiedzi
2017-01-11 05:01 Wicked pdf not rendering header/footer »
I am using wicked_pdf for generating pdf from html on my rails project. It is rendering template but I could not manage to print header/footer section...
(1) odpowiedzi
2017-01-10 21:01 Carrier Wave mini_magick_processing error »
I am trying to upload an image in my signup form using carrierwave gem but getting this error: Avatar translation missing: en.errors.messages.mini...
(0) odpowiedzi
2017-01-10 14:01 Can't create model on ruby on rails »
I'm starting to learn ruby on rails. the problem that i have is that i don't know why i get there while i want to create model this is the command th...
(5) odpowiedzi
2017-01-10 10:01 Redirect with cookies »
Is it possible to redirect to other domain with cookies? I tried followong. def test_redirect response.headers['Cache-Control'] = 'no-cache, no-sto...
(1) odpowiedzi
2017-01-09 21:01 Ruby on Rails: Add form for another model on a form »
Within my Ruby on Rails application I am trying to implement a relationship between Group and Contact, whereby one group can contain many contacts and...
(3) odpowiedzi
2017-01-09 11:01 rails mysql regex input not getting sanitized properly »
I am doing the following on a rails 3 app def test(str) User.where("name REGEXP ?",str).last end Using the format above, rails generally handle...
(1) odpowiedzi
2017-01-09 02:01 What exactly was initialize_on_precompile used for? »
I'm having trouble understanding what initialize_on_precompile was used for. What exactly did it mean for it to be false (especially as it relates to ...
(1) odpowiedzi
2017-01-08 23:01 Why in Rails table fields are defined in migrations but not in models? »
I am studying Ruby on Rails and confused with structure of files and code.. Why in Rails table fields are defined in migrations but not in models? I k...
(1) odpowiedzi
2017-01-07 21:01 Rails Alternative to use polymorphic associations »
I've see that the polymorphic association break the rules of relational db design and in the end cause more harm to the app. so, the left alternative ...
(1) odpowiedzi
2017-01-07 14:01 Rails Form Check Box or select Array value for multiple arrays »
I'm maintaining a Rails 3.2.22.5 legacy app and creating a form to send messages internally to users (in this case they are called medics). Here is w...
(1) odpowiedzi
2017-01-07 04:01 How to achive abstraction and encapusulation in ruby on Rails? »
How to achieve abstraction and encapsulation in ruby on Rails? Without using any gem? ...
(0) odpowiedzi
2017-01-06 19:01 Update hash value in class »
Here I have a little demo-code: class UpdateHash def initialize(value) @value = value save end def save @value = 10 end end ha...
(3) odpowiedzi
2017-01-06 16:01 undefined method `attribute_method_matcher' for "":String first THEN NoMethodError: undefined method `has_key?' for nil:NilClass »
Hi I am working on a project via ruby on rails. I have my model defined as hkn_int.rb and point it to field_database table So when I in rails conso...
(0) odpowiedzi
2017-01-06 11:01 rails generate directory recursively »
I am creating a gem which generates directory from template, in my template folder there is one folder which contains files and folder both. But when ...
(0) odpowiedzi
2017-01-05 22:01 Shorten mapping and concat »
I get an array with person objects. A person can have several houses: person.houses => ActiveRecord_Associations_CollectionProxy Some houses ca...
(2) odpowiedzi
2017-01-05 21:01 Discarding everything in a string variable after the second decimal »
I have a Ruby string variable with the value 1.14.2.ab3-4.dl0.rhel However, I want to discard everything after the second decimal so that I get the va...
(4) odpowiedzi
2017-01-05 06:01 JS front end update view {not working}? »
When a user creates a note I want that note to save on the back-end and show on the front-end without refreshing the page. DISCLAIMER: I'm bad wit...
(2) odpowiedzi
2017-01-04 17:01 Rails Brakeman SQL injection warning while accessing an oracle view/function »
I have rails code that is consuming an oracle view/function. This is my code: def run_query connection.exec_query( "SELECT * FROM TABLE(FN...
(1) odpowiedzi
2017-01-04 17:01 How to remove or edit the pluralization for comments and likes in rails »
I am new to rails, and i am working on a rtl website! I am trying to fix the pluralization in comment.count and get_upvotes.size to be replaced by the...
(1) odpowiedzi
2017-01-04 10:01 Rails 3 find_or_create_by_slug sometimes creates duplicate records »
I am using Rails 3.2.14 with Ruby 2.1.0. I have a method which takes care of creating a user in DB by checking if the email id exists or not. I use d...
(1) odpowiedzi
2017-01-03 19:01 Trying to upgrade to rails 5: Make sure that `gem install pg -v '0.18.4'` succeeds before bundling »
I am trying to update to Rails 5. I have successfully updated Ruby to '2.3.1' in my gem file, and ran bundle install. Then I went for Rails 5.0, and ...
(1) odpowiedzi
2017-01-03 15:01 Syntax error on empty line »
I have the following error showing, not sure what went wrong... /home/ubuntu/section3/alpha-blog/app/views/users/_form.html.erb:39: syntax error, une...
(1) odpowiedzi
2017-01-03 11:01 Google Search Console is still indexing old pages »
I had changed the URL structure of my website 5 months back. Previously it was not country specific so I made it country specific by adding /[language...
(1) odpowiedzi
2017-01-02 23:01 Mina deploy 1.0.6 Identity file »
After update Mina the indentity file is not accessible. someone have the same problem with the mina 1.0.6? Warning: Identity file ~/.ec2/gsg-keypair ...
(0) odpowiedzi
2017-01-02 13:01 limit the number of stack trace lines when exception is generated in rails »
Is there a way i can control the number of stack trace lines generated when a exception scenario happen in a rails application. The reason for this i...
(1) odpowiedzi
2017-01-02 13:01 how do I change environments in ruby on rails »
At the moment, I am unable to run my server because apparently I seem to be in the wrong environment. Suppose I am in the test environment, how do I ...
(2) odpowiedzi
2017-01-01 19:01 undefined method `[]' for false:FalseClass on adaptivepayments-sdk-ruby »
Someone is having this issue? or now why this is happing on configuring the paypal sdk adaptive? place the configuration on the yml did not show this...
(0) odpowiedzi
2016-12-31 16:12 Ruby on rails , test is saying a column doesn't exist but its on the schema »
in my clients table, I have a column named email. But when I made the tests for the clients controller and the model, the tests kept on saying that th...
(1) odpowiedzi
2016-12-30 20:12 Problems displaying a list of my model instances »
in the application I have made, I have clients and projects. a Client has many projects and a project belongs to a client. Projects are made by first ...
(0) odpowiedzi
2016-12-30 16:12 Rails: Search by custom instance method's value using tire gem & elasticsearch »
For example, I have Article model like class Article < ActiveRecord::Base #Columns: id, title, status_number...etc STATUSES = {1 => "SUCCE...
(0) odpowiedzi
2016-12-30 09:12 order with recent created record in multiple associated models rails »
i have three associated models artical.rb: has_many :texts has_many :notes has_many :attachments i want to order artical with recent created re...
(2) odpowiedzi
2016-12-29 15:12 Model's attributes are being failed validation when they are not passed »
Is it logical that when I don't pass attributes' values, they failed the validation of the custom validation method, even though I am not trying to up...
(0) odpowiedzi
2016-12-29 10:12 Capistrano assets:precompile , undefined $modal-delay for css »
Following is my deploy.rb # config valid only for current version of Capistrano lock '3.7.0' set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/s...
(0) odpowiedzi