…html.erb and add the following code just above the yield block.#app/views/layouts/application.html.erb <p class="notice"><%= notice %></p> <p class="alert"><%= alert %></p>Paperclip IntegrationDue to security reasons, we have to permit parameters in the Devise controller. Thanks to the awesome team behind Devise, doing this is easy.Open up app/controllers/application_controller.rb and paste in the following…
…The process of software development is complicated. When we face problems, we usually try to tackle the complexity by turning it into more understandable and manageable pieces.Domain-Driven Design is a software development methodology for tackling complex software projects to deliver an end-product that meets the goals of the organization. In…
…HTML, JSON and Binary Files (image/audio/video) and not just XML content as required by SOAP. Built-in Action Mapping in controller, based on HTTP verbs (GET, POST, etc.) Creating a Web APITo create a Web API, we will use Visual Studio. If you have Visual Studio 2012 or a higher version…
…HTML-like syntax that is used on lines 3 and 8. This is called JSX. What’s JSX? JSX is an XML/HTML-like syntax which is used to render HTML from within JavaScript code. React transforms JSX into native JavaScript for the browser, and with the tools provided you can convert your existing…
…HTML, no JavaScript, etc.)._e() is similar to the above function, but rather than just retrieving the translated version of the string, it will also echo the result of the translation to the screen._x(): unfortunately, there are times where a given string will return the wrong translation. When this happens, using this function…
…HTML. You use JSX within React code to easily create components for your apps. JSX transforms into JavaScript when React compiles the code. The beauty of React is that you can create reusable code and easily structure your app from a component-based mindset. Finally, the gap between mocking up wireframes…
…HTML is hard-coded into the main plugin's PHP file. The HTML is included in an external file that's included via the core PHP file. I'm a fan of the latter because I think it helps to make the code more maintainable. So for the purposes of this example, we are…
…HTML file by adding the following statement along with other JS libraries:<script src="/static/js/moment.min.js"></script>The basic usage of Moment.js is shown in the following code. This can be done in the browser console for JavaScript:>>> moment().calendar(); "Today at 9:37 PM" >>> moment().endOf('day').fromNow(); "in 2 hours" >>> moment().format('LLLL'); "Wednesday, January 27, 2016 9:38…
…What You'll Be CreatingOptimizing Your Google Advertising Revenue This is the eighth tutorial in our series about Google DoubleClick for Publishers. DFP is a service that can seem incredibly complicated to the uninitiated, so this series aims to simplify it and educate you on a number of the most important…
…HTML & CSSWhat Is a Welcome Page?If you create a getting started page for your WordPress plugin that lists all the features and steps related to the product, that page can be called a welcome page. The idea of creating this page is to provide users with some information about the…