- Get link
- X
- Other Apps
Posts
Showing posts from November, 2022
basic concepts of rails
- Get link
- X
- Other Apps
1. Add a basic href link ::with the uri pattern of routes :: <a></a> <a href ="" ></a> <a href ="/articles/<%articles.id%>" ></a> ..................................................................................................... 2. Add a basic href link ::with the resources and prefix pattern of routes :: <a></a> <a href ="" ></a> <a href ="article_path(article)" ></a> ..................................................................................................... 3. Add a basic link_to methods :: <%= link_to %> <%= link_to article.title,title %> .....................................................................................................
Install another version of Rails in the same system
- Get link
- X
- Other Apps
Install another version of Rails in the same system :: Link :: https://stackoverflow.com/questions/17052629/how-to-switch-to-an-older-version-of-rails ............................................................................. 1. gem uninstall rails 2. rvm gemset create rails6 3. rvm gemset use rails6 4. gem install rails -v 6.1.3.1 5. rails -v
api pass data json in controller emendate
- Get link
- X
- Other Apps
def create @feedback = Feedback.new(feedback_params) if @feedback.save redirect_to admin_customer_feedback_feedback_form_path(@feedback.customer_id,@feedback.id) # return render json: {message: "Feedback is saved"} else # return render json: {message: @feedback.errors} render :new gflash :error => @feedback.errors end end
main code in emendate for feedback by the customer
- Get link
- X
- Other Apps
<link href="https://emoji-css.afeld.me/emoji.css" rel="stylesheet"> <%= simple_nested_form_for([:admin, feedback], html: {class: "forms-sample", role:"form"}) do |f|%> <div class="row mb-2"> <div class="col-sm-4"> <label for="mandateVariant" class="mt-2 mr-sm-2">Feedback</label> </div> <div class="col-sm-8"> <%= f.input :body, class: "form-control mb-2 mr-sm-2", label: false %> </div> </div> <%= f.hidden_field :rating %> <%#= f.hidden_field :feedback_rating value = "feedback_rating"%> <i class="em em-unamused" aria-role="presentation" aria-label="UNAMUSED FACE" title="very bad" onclick= "myFirstFeed('very_bad')" ></i> <i class="em em-slightly_frowning_face" aria-role="pre...
api methods in rails for controller for all http verbs
- Get link
- X
- Other Apps
class ApplicationController < ActionController::API include ActionController::MimeResponds end Advance Additions :: class PostsController < ApplicationController def index posts = Post . all respond_to do | format | format . json { render json : posts } format . xml { render xml : posts } end end end A sample controller could look like this: def show post = Post . find ( params [ : id ]) render json : post end ................................................................................................................... .................................................................................................................... API Controller is a lightweight version of ActionController::Base , created for applications that don't require all functionalities that a complete Rails controller provides, allowing you to create controllers with just the features that you need for API onl...
emoji in rails
- Get link
- X
- Other Apps
https://www.driftingruby.com/episodes/emojis-from-scratch https://github.com/ID25/rails_emoji_picker https://sowenjub.me/writes/emoji-picker-controller-with-stimulus-jsz emoji pics link : https://www.emojipng.com/search/laughing%20emoji/2/ link :: https://rubydoc.info/gems/emojionearea-rails good emoji link by css https://emoji-css.afeld.me/
emendate task ar sir -- how to pass value with hidden field
- Get link
- X
- Other Apps
emendate project setup
- Get link
- X
- Other Apps
Project Setup Emendate :: 1 nov 2022 ...................................................................................................................................................................................................................... ................................... ............ 0. Install jruby 9.2.7.0 sudo apt install jruby -- jruby 1.7.22 version is installed. rvm install "jruby-9.2.7.0" rvm use "jruby-9.2.7.0" 1. Download and Extract Zip file 2. Import the sql file – copy paste old sql file in the zip folder in the main root folder and run the command -- psql -U postgres `database_name` < sqlfilename psql -U postgres chingchingbyakon_dev1 < local_data_25_05_2022.sql 3. Change the names in database.yml - username change userpassword change database name change 4. rake db:create 5. rake db:migrate - was error after some migratrions 6. first run the project at the branch master 7. second run the proejct at the branch new_task switche...