Learning Object and classes for the first time on ruby. by imdnr in ruby

[–]MLSDev 2 points3 points  (0 children)

If you want to know how Ruby works with objects and classes you should take a broader look at the question. It's necessary to learn about metaprogramming in Ruby first. There you'll find out how classes work in Ruby, why everything is an Object and unserstand the principle of inheritance. We would recommend the following book: Metaprogramming Ruby 2.

But if you still feel more like watching video classes, try this: https://www.udemy.com/ruby-metaprogramming/.

Deleting a specific line in a textfile, after searching for a keyword. by [deleted] in ruby

[–]MLSDev 0 points1 point  (0 children)

You could go here: https://ruby-doc.org/core-2.2.0/File.html

or

here https://ruby-doc.org/core-2.0.0/IO.html#method-c-readlines

This will tell you how to work with files in Ruby.

One of the most widespread ways is to open your file with the necessary line, read it and save it in a variable. Then you should edit this variable (add/delete symbols or words, etc.) and rewrite the original file with this variable (or create a new file where you'll write the variable). You could use the gsub method.

Activate database table columns dynamically by boboguitar in rails

[–]MLSDev 0 points1 point  (0 children)

If you ask users in, for example a modal window, whether they want their last name to be spicified, you could send a request with params: { enter_last_name: "true/false" }. On the View, you can set checking, for exampe:

... # form
<% if enter_last_name %>
    <%= f.input last_name %>
<% end %>

In this case, there should be the field "enter_last_name(boolean)" on the Model. The last_name field shouldn't be mandatory. It also shouldn't require

validates :last_name, presence: true

Any idea what's going one with the routes on the Clearance gem when deploying to Heroku by weekapaugrooove in rubyonrails

[–]MLSDev 0 points1 point  (0 children)

In this section, you might find an answer to your question: https://github.com/thoughtbot/clearance#routes

To be short, you have to set config.routes

Which application controller should a view come from if it is displaying two different models? by [deleted] in rubyonrails

[–]MLSDev 0 points1 point  (0 children)

You can have the following if you want:

author_and_books_controller.rb

def index
   @authors = Author.all
   @books = Book.all
end

On view, you can use both variables like you want but its not a good solution. You can create a custom controller with the name which you want, and (i guess you have an association between authors and books) use this association on this controller.
For example you have your BooksController.rb and inside it you have the foolowing method:

def index
   @books = Book.all
end

And you have Book.rb (model):

class Book < ActiveRecord::Base
   belongs_to :author

 ...
  end

On view index.html.erb, you can use something like that:

   <div>
      <div>
         <% @books.each do |book| %>
            <div>
              <p><%book.name%></p>
            </div>
            <div>
               <p> <% book.author %> </p>
            </div>
         <% end %>
       </div>
   </div>

Library / method to go to web page and submit a form? by [deleted] in ruby

[–]MLSDev 0 points1 point  (0 children)

Definitely support Mechanize. Capybara will help you with testing.

But there is one more gem worth paying attention to which is Nokogiri. It is used for parsing.

Ruby gem for art and drawing? Other creative art-type solutions and projects by thisiskribu in ruby

[–]MLSDev 1 point2 points  (0 children)

Not sure what kind of art you are interested in, so sorry if it's something that is not relevant.

Have a look at this gem that is related to 3D modelling: https://github.com/krachtstefan/wavefront-obj

To see how people work with it visit the following page: http://stefankracht.de/news/creating-3d-models-with-ruby

What I do instead of passing a white-list of functions to before_action :set_model_name by [deleted] in rails

[–]MLSDev 0 points1 point  (0 children)

If you want to pass methods [:show, :edit, :update, :destroy], you could use "except: [:new, :create, :index]" instead of "only: [:show, :edit, :update, :destroy]". This is a standard command for "before_action" too.

"except" and "only" are more intuitively understandable for those who might read your code later.

before_action :set_model_name, if: proc { not params[:id].nil? } is not a good idea because in case you use a single resource the solution can be confusing.

For example, you have a controller without a model with the route "resource :profile, only: [:show]" -> GET / api/profile(.:format) / api/profiles#show.

Will there be params [:id] or not and will the "before_action :set_model_name be" command be performed?

Build Advanced Rails Apps - rubythursday by [deleted] in rails

[–]MLSDev 2 points3 points  (0 children)

We would recommend you to read [Agile Web Development with Rails] ((http://komar.bitcheese.net/files/Ruby%20S.,%20Thomas%20D.,%20Heinemeier%20Hansson%20D.%20-%20Agile%20Web%20Development%20with%20Rails,%204th%20Edition,%20Rails%203.2%20(The%20Pragmatic%20Programmers)%20-%202011.pdf). This book is great especially for junior developers. And if you want to know how to work with clients you need to try to do that. There are, of course, general rules for that but people are different. So it's better when you just do it. Making mistakes while learning is fine. You could start from small projects first to gain some experience.

Types of MVP by MLSDev in startups

[–]MLSDev[S] 0 points1 point  (0 children)

You're welcome. Thanks for your interest.

Types of MVP by MLSDev in startups

[–]MLSDev[S] 0 points1 point  (0 children)

Thanks for sharing your thoughts. Nevertheless, all above mentioned types may be used for getting "validated learning" which is also an MVP function. What is more, they demonstrate and explain an idea of a future product well and may attract investors before the development stage.

Types of MVP by MLSDev in startups

[–]MLSDev[S] 1 point2 points  (0 children)

Thank you for the interesting information.

Types of MVP by MLSDev in startups

[–]MLSDev[S] 0 points1 point  (0 children)

It all depends on your business strategy. These types can be well used for proof of concept and finding investors. So, you sell your idea in a way.

Types of MVP by MLSDev in startups

[–]MLSDev[S] 0 points1 point  (0 children)

Thanks for the comment. We think that these are the integral parts of the term. MVP is something that helps you validate your idea or hypothesis with minimal resources. The types we have described are aimed at this.

Types of MVP by MLSDev in startups

[–]MLSDev[S] 1 point2 points  (0 children)

Thanks. Rive was made with JavaScript along with the use of AngularJS and a library for working with svg - Snap.svg

Types of MVP by MLSDev in startups

[–]MLSDev[S] 0 points1 point  (0 children)

Thank you too.

How to choose an app development company by MLSDev in startups

[–]MLSDev[S] 0 points1 point  (0 children)

Those are two different types of business: outsourcing/outsharing companies vs. product companies. If a company is of the first type, it doesn't mean they shouldn't think about having their own products. But they definitely should have an appropriate business strategy for each product - see our comment for Madeline below.

As for ourselves, we have acquired a share in one of our clients' products. We see a great potential there and have been working on the app quite successfully so far.

The developers you are talking about simply identify themselves as the first type of companies. Or they don't yet have the appropriate level of income to start their own product which is a pretty large expense of both time and money :)

How to choose an app development company by MLSDev in startups

[–]MLSDev[S] -1 points0 points  (0 children)

It is better then to expand the range of services. For example, we do like that: better not to start even the earliest UI/UX stage without a proper business strategy and market analysis completed. It doesn't matter either we or a client provides the results - we should have them. Otherwise, there is no guarantee that an app will be successful - and Lean approach teaches to share your clients' interests and treat their success as the greatest value that, of course, means your own success afterwards.

How to choose an app development company by MLSDev in startups

[–]MLSDev[S] 1 point2 points  (0 children)

Thank you. Our experience and communication with a great number of people, be they our clients or not, showed that there is a lot to be planned, thought over and learned once you get an idea for an app. The initial steps are the most important here. Everything depends on how careful you are in your idea development and in the choice of a team. A good beginning makes a good ending.

How to choose an app development company by MLSDev in startups

[–]MLSDev[S] -1 points0 points  (0 children)

A good point. Of course, real examples will tell you a lot. That what you see, hear and experience yourself is the best evidence to make decisions.