Articles tagged 'Ruby
List Of All Municipalities By Districts By Provinces Of Nepal
Shiva Bhusal (CTO) 22 Min. Read Sep 2, 2019
Data Ruby Hash Nepal Districts Municipalities Province
Read More..
I encountered a series of errors when I tried to run my existing Rails5 app in my freshly installed macOS Mojave. this generated some errors like, node not found, then I installed node using brew. then, Solution now it installs all the dependencies properly
Read More..
Rails | Apartment Gem | Resets Ar Objects When Tenant Switched
Shiva Bhusal (CTO) 1 Min. Read Dec 5, 2018
Problem Rails Ruby JS Apartment Multi Tenancy PG Postgresql schema
I ran into a weird situation today. Active Record objects stored in vars are removed when I switched from one tenant to another on the fly. This will create a weird test-failing scenario and you never know why its happening. def switch(name) yield(name) end @customers = [1,2,3] switch(‘shiva’) do |name| puts name puts @customers end […]
Read More..
Ruby On Rails Interview Practice Questions And Answers
Shiva Bhusal (CTO) 0 Min. Read Oct 15, 2018
Ruby Rails Interview Questions Practice
Read More..
Installing Ruby RVM is the best Tool to manage multiple versions in your system. # Update your package manager first: $ sudo apt-get update # Install dependencies for ruby # This installs CURL, Git and other dependencies sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties sudo apt-get […]
Read More..
Problem I have to edit a proposal among many proposals. When we click edit button a popup appears with all fields filled. There is a button ‘Verify’ to preview the proposal before sending to client via Email. Suppose URL to edit proposal is proposals/:id/edit It shows a popup with all fields filled and a ‘Send’ and […]
Read More..
Difference Between Update, Update Columns, Update Column, Update Attributes, Assign Attributes
Shiva Bhusal (CTO) 1 Min. Read Oct 8, 2014
Rails Ruby Active Record Update update_columns update_column
Though they look and sound similar, there is significant difference between these method. Some forcefully update the record where some only set the attributes but do not send the query to the database.
Read More..
To disable the user to select dates earlier than a date, you need to create a Date object of your barrier date as follows #Create a Date Object barrierDate = new Date(“2014/02/12”); #Apply datepicker to a field #You can also set format of date you prefer $(‘#idOfDateField’).datepicker({minDate: barrierDate});
Read More..
Read More..
We can close magnific popup in various ways We can add a button within the popup and assign a function on click event like $(‘#close-button-verify’).click(function(){ //This will close the most recently popped dialog //This method specially works for auto popped dialogs i.e. //Popup you opened using $.magnificPopup.open() $.magnificPopup.close(); }); If popup is triggered via onClick […]
Read More..